deft icon indicating copy to clipboard operation
deft copied to clipboard

Problems with PUT request

Open ilmich opened this issue 13 years ago • 5 comments

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:)

ilmich avatar Jul 08 '11 00:07 ilmich

That should work for now. Deft has no official support for PUT methods (yet :) )

rschildmeijer avatar Jul 08 '11 06:07 rschildmeijer

my fork now support it :) any suggestions are welcome :)

ilmich avatar Jul 09 '11 11:07 ilmich

Cool. Det has just been accepted into Apache incubation (http://markmail.org/message/qkbl7djiqwg7eofo). There's alot of migration and infrastructure work todo at the moment. So the coding / patch reviewing is lagging behind. :) Thanks for the great work by the way. I would love to see your continued support during the apache incubation :)

rschildmeijer avatar Jul 10 '11 08:07 rschildmeijer

wow great! congratulations! :) I'm also working on other things (configuration via json, custom errors pages, templates, revised cookies handling and other useful things) I believe in your project, I use Deft to develop a potentially large web application and you can count on my support in the future! thanks for your work!

ilmich avatar Jul 10 '11 10:07 ilmich

Awesome. Don't hesitate to ask questions if you have any. The preferred way is irc (freenode, #deft) or mailing list (atm the google group, will soon be migrated to apache mailing list)

rschildmeijer avatar Jul 10 '11 17:07 rschildmeijer