[PATCH] Support for Content-type header on HTTP PUT

Tobias Koenig tokoe at kde.org
Wed Feb 28 16:16:20 GMT 2007


Hi,

the attached patch adds support for the 'Content-type' header on
HTTP PUT operations.

I can't find any spec/rfc where exactly is stated that HTTP PUT must
provide a content-type, however some server expect it from their
clients, so we should allow the client applications to use
  job->addMetaData()
to make these servers happy.

Objections?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
Index: http.cc
===================================================================
--- http.cc	(Revision 629391)
+++ http.cc	(Arbeitskopie)
@@ -2491,7 +2491,7 @@
       header += "\r\n";
     }
 
-    if (m_request.method == HTTP_POST)
+    if (m_request.method == HTTP_POST || m_request.method == HTTP_PUT)
     {
       header += metaData("content-type");
       header += "\r\n";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070228/c3f1ea0a/attachment.sig>


More information about the kde-core-devel mailing list