|
|
| Author |
Message |
< Yaws mailing list ~ body_method.patch and no_body_method.patch |
| Guest |
Posted: Sun Jul 29, 2007 9:53 pm |
|
|
|
Guest
|
Hello!
I've attached two patches for your consideration, which I wrote mostly
to improve RFC 2616 compliance.
body_method.patch merges yaws_server:body_method and most of
yaws_server:'POST', so chunked transfer-encoding is supported in
non-POST requests.
The new body_method doesn't include 'POST''s special case for
non-"multipart/form-data" request bodies, which aren't necessarily
URL-encoded data anyway. Why should URL-encoded request-bodies be
exempt from the post size limit? That appears to have been added in
revision 773: "Fixed problem with large urlencoded posts and partial
post size". That log message doesn't explain what the problem was, but
if the old behavior is still desired, Yaws should certainly check
specifically for the application/x-www-form-urlencoded media type and
not just for any non-"multipart/form-data" media type.
Also, if the request body isn't chunked and the request doesn't
include a Content-Length header, body_method will return <<>> instead
of dying. RFC 2616 doesn't seem to *require* a message-body on any
request[1].
Finally, I removed get_client_data_all because it doesn't make any
sense to read the incoming request until EOF, since it will then be
impossible to send a response[2].
no_body_method.patch is a tiny patch that modifies yaws_server:'GET'
to use yaws_server:no_body_method, as the other method handlers for
requests types that must not include a message body already do.
Footnotes:
[1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.3
[2] http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|