UserPreferences

Diff for "PutDeleteSupport"


Differences between versions dated 2007-11-01 17:06:34 and 2007-11-01 19:24:58

Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<a href="http://www.azresults.com/search.php?qq=Replica%20Chanel%20Watches%20On%20Sale">Replica Chanel Watches On Sale</a> = PUT and DELETE support =

This page summarizes the client and server side support for the HTTP methods PUT and DELETE. The contents of this page was earlier to be found in CarrotVsOrange, but is moved here to have the tests and results more easilly available.

== Server-Side Platform support of PUT and DELETE ==

The main issue behind this discussion is centered around whether platforms support the additional HTTP and/or WebDav methods. This question of support is one that needs further investigation.

'''Note:''' The context of this question is a ''Atom Publishing System'', not a web server, site as a whole, or some particular directory path within a site. Specifically: if you can run an Atom publishing system at a "gateway" URL using GET/POST can you not also run the same "gateway" URL as a URL-space with GET/PUT/DELETE/POST underneath it.

  * '''Apache''': :) [http://bitsko.slc.ut.us/2003/08/atom.cgi.txt atom.cgi]
  * '''Python''' :) [http://diveintomark.org/public/2003/08/atom-api-20030825.py CGI server]
  * '''Coldfusion''': incoming PUT and DELETE?
  * '''Perl''' :) [http://www.isolani.co.uk/blog/semanticweb/PerlAtomApiImplementation atomrest.pl]
  * '''PHP''':
    * :) PHP/4.3 [http://www.isolani.co.uk/blog/atom/PhpAtomApiImplementation atom.php] (PHP/4.3.2 Apache/1.3.28 Red Hat/7.2 )
      * PHP can extract the XML data from a POST without needing always_populate_raw_post_data enabled using [http://php.net/wrappers.php php://input].
    * :( PHP prior to 4.3 [http://bitsko.slc.ut.us/2003/09/atom.php.txt atom.php] 405 Method Not Allowed
      * [MikeDavies] PUT request does work on PHP/4.0.6, Apache 1.3.x on Windows. I originally started developing using this setup and it handled PUT request fine. What I couldn't do was extract the raw HTTP entity body, since that required a specific configuration change of always_populate_raw_post_data set to 1. Is the problem that's causing the frown not an Apache 2.x default configuration problem?
  * '''Java''': :) The Servlet spec exlicitly supports all the verbs by extending [http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServlet.html HttpServlet], and retrieve the XML using [http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletRequest.html#getReader() HttpServletRequest.getReader()]
  * '''ASP''': :) RestAspExample
  * '''ASP.NET''': :) RestAspNetExample

== Client-Side Platform support of PUT and DELETE ==

  * '''Python''': :) [http://bitworking.org/rfc/implementation/wxAtomClient_25Aug2003.zip client] :( [http://www.python.org/doc/current/lib/module-urllib2.html urllib2] :) [http://python.org/doc/current/lib/module-httplib.html httplib]
    * Note: The urllib2 module defines functions and classes which help in opening URLs (mostly HTTP) in a complex world -- basic and digest authentication, redirections and more.
  * '''Perl''': :) [http://search.cpan.org/author/GAAS/libwww-perl-5.69/lib/HTTP/Request.pm HTTP::Request], :) [http://search.cpan.org/author/BTROTT/XML-Atom-0.02/ XML-Atom]
  * '''Ruby''':
   * :) [http://www.rubycentral.com/book/lib_network.html#Net::HTTP.get Net::HTTP]
   * :) [http://raa.ruby-lang.org/list.rhtml?name=http-access2 http-access2]
  * '''ColdFusion''': :) [http://www.macromedia.com/devnet/mx/coldfusion/articles/intro_61.html CF MX 6.1]
   * :( [http://livedocs.macromedia.com/coldfusion/6/Using_Server-Side_ActionScript_in_ColdFusion_MX/tags3.htm CF.http] -- all versions prior to CF MX 6.1 do not natively support outgoing PUT and DELETE
  * '''cURL''': :) {{{curl -X PUT -T data.file http://host.domain/path}}} or {{{curl -X DELETE http://host.domain/path}}} ({{{--request}}} also works in place of {{{-X}}})
  * '''ASP''': :) RestAspExample
  * '''ASP.NET''': :) RestAspNetExample
  * '''JavaScript and DHTML''': :) [http://www.isolani.co.uk/atomClient/atomClient.html client]
    * Using [http://jibbering.com/2002/4/httprequest.html XML HTTP Request] supported on Internet Explorer and Mozilla (Safari 1.1 now supports XML HTTP Request, also Opera 7.6 is starting to support it). The one drawback of using XML HTTP Request is that, like applets, it looks like you can only connect to the server the client script came from. [http://www.isolani.co.uk/blog/atom/JavascriptAtomApiClientUsingXmlHttpRequest blogged]. Gmail uses XML HTTP Request extensively in its client interface
  * '''WAP''': ? What about WAP/WML and other mobile environments?
  * '''Java''':
    * :) [http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html#setRequestMethod(java.lang.String) java.net.HttpURLConnection.setRequestMethod()]
    * :) [http://jakarta.apache.org/commons/httpclient/methods.html Apache Jakarta HTTPClient]
    * :) [http://www.innovation.ch/java/HTTPClient/ HTTPClient v0.03] This is not the Apache HTTPClient, but an earlier project by the same name. It has a friendly LGPL license, which explicitly states that use as a library is permitted (see the documentation for the license clarification statements). It provides a complete http client library supporting all methods and method extensions. I have used it extensively in developing a REST Web Services Framework for client requests and testing, see [http://www.cognitiveweb.org/technology/projects/cweb/]. Lately, I have been working on a client layer over this package to provide for secure delegation of the authority of the client and other such features.
    * Note: all "applets" are limited (POST or PUT/DELETE) for security reasons to only allow a connection back to the server it was delivered from, [http://java.sun.com/sfaq/#prevent Applet Security FAQ]. The main workaround is to use a proxy on the originating server [http://www.webreference.com/dev/proxy/ WebReference: Getting out of the Sandbox: Building an Applet Proxy Server]
    * :-( / :/ [http://java.sun.com/products/midp/ J2ME MIDP 1.0/2.0] Mobile Java '''does not''' support PUT or DELETE (only HttpConnection.GET and HttpConnection.POST.) Though there *might* be a work around by opening a direct socket, many phones do not support direct socket communications. '''Only''' HTTP connections are required in the MIDP 1.0 spec. '''Update: ''' It's possible to do PUT/DELETE on phones that support SocketConnection/SecureSocketConnection. Most phones that have HTTPS support also provide these interfaces.
      * This question isn't relevant, as the spec is explicit about supported request methods, but how many implementations actually test and restrict the 'String method' passed to setRequestMethod()? Are there examples of any that allow any HTTP request method?
      * I can confirm non-working setRequestMethod("PUT") in Nokia 3650.
        * As [http://www.russellbeattie.com/notebook/1006319.html#151055 suggested on Russ' blog]: "why not simply create an HTTPConnection class that supports DELETE and PUT... In fact, just decompile the current j2me implementation"
  * '''Flash''': :( Can PUT and DELETE be done in ActionScript?
    * Initial googling doesn't mention it. Relevant pages [http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary855.html Flash XML.send] sends as POST request, also there's a [http://tupps.com/flash/faq/xml.html Flash XML FAQ]
    * The Flash player does not support PUT and DELETE. It only has support for GET and POST.
    * [TimKnip] Check out the [http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary860.html XMLSocket] object. It guess it would be possible to send data like: XMLSocket.send("PUT /blog/1 HTTP1.1") UPDATE: Flash can't connect beyond own domain (security)...
  * '''Apple''': :) [http://www.kung-foo.tv/blog/archives/000867.php#000867 WebKit on 10.4]
  * '''Apple''': :-( [http://www.kung-foo.tv/blog/archives/000867.php#000867 WebKit on 10.2 and 10.3]
  * '''Apple''': :) [http://www.imc.org/atom-protocol/mail-archive/msg00425.html CoreFoundation]
  * '''Brew''': ?
  * '''Palm''': ?
  * '''Pocket PC''': For .NET Compact Framework, "The HttpWebRequest class is capable of handling any of the HTTP 1.1 verbs: GET, PUT, POST, DELETE, TRACE, HEAD or OPTIONS."
  * '''Symbian''': ?

== Clients or Servers not able to use POST ''or'' PUT/DELETE for Atom API ==

The following are implementations where one might at first think, "oh, this one doesn't support PUT/DELETE", when in fact they are not capable of supporting the Atom protocol using POST, either.

 * '''DHTML''' using forms: A browser that strictly supports the W3C recommendations probably won't support PUT and DELETE. The [http://www.w3.org/TR/html4/interact/forms.html#h-17.3 HTML4.01 specification for the form element] defines the list of allowable methods as get and post. So there's no requirement that they must or should be supported. Both POST and GET will be sent as a collection of name value pairs by default. This format can be changed by setting the [http://www.w3.org/TR/html4/interact/forms.html#adef-enctype enctype] attribute on the form object. This enctype can be an encoding-type as specified in [http://www.ietf.org/rfc/rfc2045.txt RFC2045] - yet the HTML4.01 specification only mentions two: [http://www.w3.org/TR/html4/interact/forms.html#form-content-type application/x-www-form-urlencoded and multipart/form-data]. MikeDavies did look down this route as a means of testing AtomAPI implementations, but basically got nowhere.
  * FormsAndPutDelete makes a distinction between using forms to progress a web application and forms to directly act on an identified resource.
 * '''wget''': retrieval only.
 * '''Perl CGI.pm''': geared towards HTML forms; mangles XML in POST, works somewhat with PUT/DELETE.
   * Perhaps we can approach the CGI.pm maintainers with the requirement that we can access the raw Entity Body?
   * Note: The CGI::Simple module, which is a pure perl drop in replacement for CGI as far as actual CGI goes supports PUT and POST with access to the raw entity body.

See also: http://curl.haxx.se/docs/comparison-table.html for a comparison of HTTP tools and capabilities.

== Hosting Providers support of PUT and DELETE ==

The following are hosting providers capabilities for supporting PUT/DELETE:

 * [http://www.cornerhost.com cornerhost] :) (JoeGregorio)
 * [http://www.he.net Hurricane Electric] (JohnPanzer) (Note: May still have Apache [http://www.mnot.net/blog/2005/10/19/options OPTIONS issue]).

PUT and DELETE support

This page summarizes the client and server side support for the HTTP methods PUT and DELETE. The contents of this page was earlier to be found in CarrotVsOrange, but is moved here to have the tests and results more easilly available.

Server-Side Platform support of PUT and DELETE

The main issue behind this discussion is centered around whether platforms support the additional HTTP and/or WebDav methods. This question of support is one that needs further investigation.

Note: The context of this question is a Atom Publishing System, not a web server, site as a whole, or some particular directory path within a site. Specifically: if you can run an Atom publishing system at a "gateway" URL using GET/POST can you not also run the same "gateway" URL as a URL-space with GET/PUT/DELETE/POST underneath it.

Client-Side Platform support of PUT and DELETE

Clients or Servers not able to use POST ''or'' PUT/DELETE for Atom API

The following are implementations where one might at first think, "oh, this one doesn't support PUT/DELETE", when in fact they are not capable of supporting the Atom protocol using POST, either.

See also: http://curl.haxx.se/docs/comparison-table.html for a comparison of HTTP tools and capabilities.

Hosting Providers support of PUT and DELETE

The following are hosting providers capabilities for supporting PUT/DELETE: