[ 
https://issues.apache.org/jira/browse/DEFT-153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13076119#comment-13076119
 ] 

Johnathan Meehan commented on DEFT-153:
---------------------------------------

Hi Michele,
I was wondering why there is new constructor in HttpRequest:

HttpRequest(String method, String fullUrl, String version, Map<String, String> 
headers, ImmutableMultimap<String, String> params)

It seems to me that we could use the existing when calling from 
PartialHttpRequest:

super(method + " <> UnfinishedRequest\r\n", generalHeaders);
    --> HttpRequest(String requestLine, Map<String, String> headers)
    
- Do we need "params" in the signature, given that null is being passed? Using 
the existing constructor, the local "parameters" will be empty, not null.
- The current parse of "version" will return "Unfinished" rather than 
"Unfinished request" as it based on spaces, so inital text would have to chage 
to something like "UnfinishedRequest".

What do you think? Is there anything I missed here?

> Problems with PUT request
> -------------------------
>
>                 Key: DEFT-153
>                 URL: https://issues.apache.org/jira/browse/DEFT-153
>             Project: Deft
>          Issue Type: New Feature
>            Assignee: Johnathan Meehan
>             Fix For: 0.4.0
>
>         Attachments: deft-153_preview.patch
>
>
> Hi,
> It seems that PUT requests that contain a large body are truncated.
> Temporarily, I resolved with the following workaround in the method 
> HttpRequest.of ()
>     if (requestLine.contains ("POST") | | requestLine.contains ("PUT")) {
>          int ContentLength = Integer.parseInt (generalHeaders.get 
> ("content-length"));
>          if (ContentLength> body.length ()) {
>              return new PartialHttpRequest (requestLine, generalHeaders, 
> body);
>         }
>     }
> I hope it can be helpful:)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to