Skip to content
Snippets Groups Projects
Commit 180f6c31 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Fixed HTTP bug where content was not passed

parent c9947523
No related branches found
No related tags found
No related merge requests found
...@@ -95,7 +95,7 @@ sub get_one ...@@ -95,7 +95,7 @@ sub get_one
# Waiting for content. # Waiting for content.
} elsif ($self->{'state'} == ST_HTTP_CONTENT) { } elsif ($self->{'state'} == ST_HTTP_CONTENT) {
return $self->_get_one_http_headers(); return $self->_get_one_http_content();
# Websocket # Websocket
} elsif ($self->{'state'} == ST_WEBSOCKET_STREAM) { } elsif ($self->{'state'} == ST_WEBSOCKET_STREAM) {
...@@ -282,12 +282,12 @@ sub _get_one_http_headers ...@@ -282,12 +282,12 @@ sub _get_one_http_headers
# does not include defined semantics for an entity-body, then the # does not include defined semantics for an entity-body, then the
# message-body SHOULD be ignored when handling the request. # message-body SHOULD be ignored when handling the request.
# - RFC2616 # - RFC2616
if (!defined($content_length) || !defined($content_encoding)) { if (!defined($content_length) && !defined($content_encoding)) {
$self->{'request'} = $request; $self->{'request'} = $request;
$self->_reset(); $self->_reset();
return [ $request ]; return [ $request ];
} }
# PG- GET shouldn't have a body. But RFC2616 talks about Content-Length # PG- GET shouldn't have a body. But RFC2616 talks about Content-Length
# for HEAD. And My reading of RFC2616 is that HEAD is the same as GET. # for HEAD. And My reading of RFC2616 is that HEAD is the same as GET.
# So logically, GET can have a body. And RFC2616 says we SHOULD ignore # So logically, GET can have a body. And RFC2616 says we SHOULD ignore
...@@ -330,7 +330,7 @@ sub _get_one_http_headers ...@@ -330,7 +330,7 @@ sub _get_one_http_headers
$self->{'state'} = ST_HTTP_CONTENT; $self->{'state'} = ST_HTTP_CONTENT;
$self->{'request'} = $request; $self->{'request'} = $request;
return [ ]; $self->_get_one_http_content();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment