Oxygen HTTP PUT fails to send Content-type

Having trouble installing Oxygen? Got a bug to report? Post it all here.
matthew.stephens
Posts: 3
Joined: Wed Jun 03, 2009 11:35 pm

Oxygen HTTP PUT fails to send Content-type

Post by matthew.stephens »

I have been testing a PUT request from Oxygen to a Ruby on Rails website, and have noticed that a Content-type:text/xml (or application/xml) is required, but there is no such HTTP header sent from Oxygen. I have tested this manually with curl and had good results, and notice that Oxygen's advanced HTTP settings do specify sending this header. Is there some way to guarantee a request is sent with a header?

Here's what I captured from wireshark:

PUT /admin/master_files/3.xml HTTP/1.1
User-Agent: Oxygen XML Editor/13.2
Expect: 100-continue
Content-Length: 1342
Authorization: Basic YWRtaW5AZXhhbXBsZS5jb206cGFzc3dvcmQ=
Host: {hostname}

(Oxygen 13.2 build 2012011017 on Mac OS 10.7.3)
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Oxygen HTTP PUT fails to send Content-type

Post by sorin_ristache »

Hello,

The advanced HTTP setting from the user preferences called Use the 'Content-type' header field to determine the resource type is used in the other direction: to determine the content type (and thus the appropriate type of editor panel for opening the file) of a file opened for editing directly from an HTTP/WebDAV server. The PUT request as sent by the Oxygen HTTP user agent does not include a Content-type header. This is why your network sniffer (Wireshark) did not show it. The Oxygen user agent includes a header

Code: Select all

Content-Type: application/soap+xml; charset=utf-8
only for SOAP messages sent from the WSDL SOAP Analyzer view, not for regular save actions in an editor panel that triggers an HTTP PUT request.

We will consider adding also a Content-type header to an HTTP PUT request that services the save action on files opened from an HTTP server.


Regards,
Sorin
Post Reply