Branch: Tag:

2003-06-16

2003-06-16 12:39:28 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some support for OPTIONS as defined by HTTP/1.1 and RFC 2518.

Rev: server/protocols/http.pike:1.401

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.400 2003/04/22 13:48:53 grubba Exp $"; + constant cvs_version = "$Id: http.pike,v 1.401 2003/06/16 12:39:28 grubba Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
1819:       MARK_FD("HTTP handling request");    +  if (method == "OPTIONS") { +  file = ([ "type":"text/html", +  "data":"", +  "extra_heads":([ +  "Allow":"CHMOD,DELETE,GET,HEAD,MKCOL,MKDIR,MOVE," +  "MV,PING,POST,PROPFIND,PROPPATCH,PUT,OPTIONS", +  "Public":"CHMOD,DELETE,GET,HEAD,MKCOL,MKDIR,MOVE," +  "MV,PING,POST,PROPFIND,PROPPATCH,PUT,OPTIONS", +  "Accept-Ranges":"bytes", +  "DAV":"1", +  ]), +  ]); +  } else {    array e;    if(e= catch(file = conf->handle_request( this_object() )))    INTERNAL_ERROR( e );
1834:    }    else if( file->pipe )    return; +  }    TIMER_END(handle_request);    send_result();   }