From: Florent G. <li...@fg...> - 2011-08-22 14:45:29
|
Good, done in #15219. Thanks! -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ ----- Mail original ----- De : Adam Retter <ad...@ex...> À : Florent Georges <li...@fg...> Cc : eXist DB ML <exi...@li...> Envoyé le : Lundi 22 Août 2011 16h28 Objet : Re: [Exist-open] NPE in REST server when no content-type on request Sounds good to me :-) On 22 August 2011 14:48, Florent Georges <li...@fg...> wrote: > Adam Retter wrote: > >> Seems sensible to me, there should not be an NPE, this may need >> applying to each method... > > Good catch! But for what I've seen, only doPut() would need > that (because only doPost and doPut actually look at the content > type, which makes sense actually). But if I understand correctly > the conditions in doPut, we'd rather need to change (line 1046): > > if (mime == null) > mime = MimeType.BINARY_TYPE; > > into: > > if (mime == null) { > mime = MimeType.BINARY_TYPE; > contentType = mime.getName(); > } > > If you agree, I'll commit both changes. > > Cheers, > > -- > Florent Georges > http://fgeorges.org/ > http://h2oconsulting.be/ > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |