hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsarevskiy Andrey (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCORE-415) DefaultHttpRequestParser doesn't fill HttpEntityEnclosingRequest.entity
Date Sun, 20 Dec 2015 14:39:46 GMT
Tsarevskiy Andrey created HTTPCORE-415:

             Summary: DefaultHttpRequestParser doesn't fill HttpEntityEnclosingRequest.entity
                 Key: HTTPCORE-415
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-415
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 4.4.4
            Reporter: Tsarevskiy Andrey

I'm using parsing mechanism this way:

val sessionInputBuffer = new SessionInputBufferImpl(new HttpTransportMetricsImpl(), 2048)
sessionInputBuffer.bind(new ByteArrayInputStream(message.getBytes(Consts.ASCII)))
val requestParser = new DefaultHttpRequestParser(sessionInputBuffer)
HttpEntityEnclosingRequest request = requestParser.parse()

with message:
"POST /moscow/ HTTP/1.1
Host: ??
Content-Length: 130
x-hub-signature: ??
content-type: application/json
accept-encoding: gzip, deflate
user-agent: Python-httplib2/0.8 (gzip)
[{"changed_aspect": "media", "object": "tag", "object_id": “??”, "time": 1450570768, "subscription_id":
??, "data": {}}]"

As you see the content should be "[{"changed_aspect": "media", "object": "tag", "object_id":
“??”, "time": 1450570768, "subscription_id": ??, "data": {}}]" but http commons doesn't
fill the field - "request.getEntity". It is null

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message