-
Notifications
You must be signed in to change notification settings - Fork 71
Kentr add server vars #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
That might work. Where do you get $parameters from? Has this been tested? |
I tested manually with some basic GET and POST requests for a Drupal app, and inspected via debugger. If there are other required tests, I'll need some pointers on testing further. The resulting values for
That's based on the assumption that The code I'm looking at is switch (strtoupper($method)) {
case 'POST':
case 'PUT':
case 'DELETE':
if (!isset($server['CONTENT_TYPE'])) {
$server['CONTENT_TYPE'] = 'application/x-www-form-urlencoded';
}
// no break
case 'PATCH':
$request = $parameters;
$query = array();
break;
default:
$request = array();
$query = $parameters;
break;
} |
Based on the above code, it would probably be better to initialize
Thoughts? |
Well, $parameters can now be querString params or parsed parameters from the request body? What if you have both? A POST with body and QueryString? |
BTW, there's some background on this PR in #14.
Good question.
In this PR, that mechanism is failing because Here's a gist with a correction for the problem and some other pieces filled in. Expected Results Here's a baseline of an actual Actual Results This is the request object under PHP-PM resulting from the suggested |
Beside the ServerBag this look pretty good to me! |
Deleted comment. Wrong thread. |
I would say thats ok since the current version always initalizes server to be empty. +1 for merging from my side (though untested- it it breaks we roll it back). |
Pushed today some changes that should now completely populate the Symfony Request with all its needed values ($post, $query, $files, $server, etc) Guess this is obsolete now. Feel free to ping me back if something is missing. :) |
No description provided.