in reply to Re^3: Are all .cgi helper modules unfit for http methods common in REST?
in thread Are all .cgi helper modules unfit for http methods common in REST?

Tested this with my test-client.pl script here, and as you said, doing PUTs with a proper header does lead to CGI.pm parsing out PUTPARAM. (As a sidenote, what will CGI.pm parse out on other methods like PROPFIND? PROPFINDDATA??)

Problem is, if you intend to use this all here for WebDAV, you can't control the clients behaving nicely. For example, gvfs, GNOME's DAV client - as I see it - does not set any headers on requests...
%ENV = { 'SERVER_NAME' => 'dav.example.com', 'REQUEST_METHOD' => 'PUT', 'CONTENT_LENGTH' => '372', 'SERVER_SOFTWARE' => 'Apache', 'QUERY_STRING' => '', 'REMOTE_PORT' => '29701', 'HTTP_USER_AGENT' => 'gvfs/1.6.1', 'SERVER_PORT' => '80', 'SERVER_SIGNATURE' => '', 'REMOTE_ADDR' => '**.***.***.***', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'PATH' => '/usr/local/bin:/usr/bin:/bin', 'REQUEST_URI' => '/test.file', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'SERVER_ADDR' => '**.***.***.***', 'SCRIPT_URL' => '/test.file', 'DOCUMENT_ROOT' => '/var/www/server/', 'HTTP_HOST' => 'dav.example.com' }; '__QUERY_OBJ' => bless( { '.parameters' => [ 'PUTDATA +' ], '.globals' => { 'DEBUG' => +0, 'NO_UNDEF_P +ARAMS' => 0, 'NO_NULL' = +> 1, 'FATAL' => +-1, 'USE_PARAM_ +SEMICOLONS' => 0, 'PARAM_UTF8 +' => 0, 'DISABLE_UP +LOADS' => 0, 'USE_CGI_PM +_DEFAULTS' => 0, 'NPH' => 0, 'POST_MAX' +=> 1024, 'HEADERS_ON +CE' => 0 }, '.path_info' => '', 'PUTDATA' => [ 'garbled mes +s' ], '.fieldnames' => { 'PUTDATA +' => 1 } }, 'CGI::Simple' ),
  • Comment on Re^4: Are all .cgi helper modules unfit for http methods common in REST?
  • Download Code

Replies are listed 'Best First'.
Re^5: Are all .cgi helper modules unfit for http methods common in REST?
by Anonymous Monk on Aug 13, 2010 at 19:37 UTC
    As a sidenote, what will CGI.pm parse out on other methods like PROPFIND? PROPFINDDATA??)

    Should be easy to find out :p