[Corona] Accept header info retrieval in the Request class

Review Request #268 — Created Jan. 29, 2014 and submitted

leo
Lunr
master
19739
lunr
Corona: Add Accept header info retrieval from the Request class

Methods for returning the best match among content type, language and
encoding given a set of supported values for each of the above.
unit tests, requests with postman
  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
leo
pprkut
  1. Code looks good, but there are entries for the RequestInterface missing and implementations for the CliRequest class
  2. 
      
leo
pprkut
  1. 
      
  2. src/Lunr/Shadow/CliRequest.php (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    nitpick: Can you add dashes in there? like 'accept-format', or underscores are also fine, like 'accept_format' (but dashes are more common). Makes it visually less frightening :)
    
    Also, since you're not really modifying the data here, there's no need to store it twice. Just fetch it directly from the ast when you need it, it's meant to be immutable anyway
  3. 
      
leo
pprkut
  1. last nitpick, almost shipit ;)
    Can you add @backupGlobals to the clirequest tests, since you touch $_SERVER?
  2. 
      
leo
pprkut
  1. Code wise this is totally fine now, but phpcs is reporting a few violations too much for me to just merge it. Can you have a look at it pls?
  2. 
      
leo
pprkut
  1. Ship It!
  2. 
      
leo
Review request changed

Status: Closed (submitted)

Change Summary:

Merged into master
Loading...