I was able to configure the proxy and I discovered that you are right, Julian. The request looks like this:
Content-Disposition: form-data; name="file"; filename="01-4970B5C0-8905-426E-B644-9D809833CDE5.png" Content-Type: image/x-png Content-Length: 852326 So now I need to figure out where that Content-Type header is coming from. This seems to be out of Sling's arena, though. Thanks to everyone for the useful suggestions. -----Original Message----- From: Julian Sedding [mailto:[email protected]] Sent: Friday, October 09, 2015 5:01 PM To: [email protected] Subject: Re: Uploaded file MIME type Have you inspected your HTTP traffic, specifically the POST request that your client sends? Your client might be sending the image/x-png as a Content-Type header. Not 100% sure that the SlingPostServlet takes that into account, but I think it does. Regards Julian On Fri, Oct 9, 2015 at 9:38 PM, Roll, Kevin <[email protected]> wrote: > And I thought you were recommending that bundle as a solution. :) I'm still > completely stumped here. The MIME mapping table looks fine in the Web > Console, and I can't see any vast difference in the way these POSTs are done. > Yet, I get the type "image/x-png", whereas a few months ago it properly came > out as "image/png". > > Can I configure SlingPostServlet to use the content inspection? Can I write > my own servlet which extends/filters SlingPostServlet and convinces it to do > the right thing? Can I put something in my POST which explicitly sets the > MIME type (a not-ideal workaround)? > > > -----Original Message----- > From: Robert Munteanu [mailto:[email protected]] > Sent: Friday, October 09, 2015 3:31 PM > To: [email protected] > Subject: Re: Uploaded file MIME type > > On Fri, Oct 9, 2015 at 9:02 PM, Roll, Kevin <[email protected]> wrote: >> Simply adding that bundle to my app doesn't seem to do the trick. Also, it >> looks like this discussion was centered on the Simple WebDav Servlet, >> however I am using the POST Servlet in my case. Is there a way to configure >> the POST servlet to use the content detection? My use case is low-volume >> enough that this is acceptable. > > Ah sorry, I though you were following the default launchpad and got a > behaviour change due to the addition of this bundle. > > Robert > >> >> -----Original Message----- >> From: Robert Munteanu [mailto:[email protected]] >> Sent: Friday, October 09, 2015 11:28 AM >> To: [email protected] >> Subject: Re: Uploaded file MIME type >> >> On Fri, 2015-10-09 at 13:17 +0000, Roll, Kevin wrote: >>> So if I understand correctly there are two possibilities: >>> >>> 1. A bundle was added at some point which changed the MIME mappings >>> for PNG. Am I correct in assuming that any change would be reflected >>> in the MIME registry as viewed from the Web Console? The mapping >>> looks correct in my current installation. >> >> Maybe >> >> SLING-4694 - Add ability to identify mime type based on file content >> https://issues.apache.org/jira/browse/SLING-4694 >> >> is related? >> >> Robert >>
