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

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

You're a patient man, Michele. :)
I do see where you are coming from, but I am personally wary of introducing 
code that is not currently used (YAGNI, and all that). My own opinion is to 
code what is needed now, and refactor as the next story/issue comes into play. 
Will MalFormedHttpRequest  use this constructor? Right now it throws an empty 
Map into the other one and I don't see any other HttpRequest implementations.

> Feel free to give me advice, and with pleasure I'll change the patch :) 
This is all just my opinion though, and I am not trying to push you into a 
particular decision just discuss things a little. The patch fixes the problem, 
so I'm good with it. Just let me know which way you intend to go.

> Problems with PUT request
> -------------------------
>
>                 Key: DEFT-153
>                 URL: https://issues.apache.org/jira/browse/DEFT-153
>             Project: Deft
>          Issue Type: New Feature
>          Components: Core
>            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