version 1.18, 2002/06/01 00:57:35
|
version 1.19, 2002/10/07 17:42:04
|
|
|
String methodName; | String methodName; |
String requestUri; | String requestUri; |
String httpVersion; | String httpVersion; |
|
HttpMethod httpMethod = HTTP_METHOD__POST; |
| |
HTTPMessage::parseRequestLine( | HTTPMessage::parseRequestLine( |
startLine, methodName, requestUri, httpVersion); | startLine, methodName, requestUri, httpVersion); |
| |
|
// |
|
// Set HTTP method for the request |
|
// |
|
if (methodName == "M-POST") |
|
{ |
|
httpMethod = HTTP_METHOD_M_POST; |
|
} |
|
|
if (methodName != "M-POST" && methodName != "POST") | if (methodName != "M-POST" && methodName != "POST") |
{ | { |
// Only POST and M-POST are implemented by this server | // Only POST and M-POST are implemented by this server |
|
|
HTTP_STATUS_NOTIMPLEMENTED); | HTTP_STATUS_NOTIMPLEMENTED); |
_sendResponse(queueId, message); | _sendResponse(queueId, message); |
} | } |
|
else if ((httpMethod == HTTP_METHOD_M_POST) && |
|
(httpVersion == "HTTP/1.0")) |
|
{ |
|
// |
|
// M-POST method is not valid with version 1.0 |
|
// |
|
Array<Sint8> message; |
|
message = XmlWriter::formatHttpErrorRspMessage( |
|
HTTP_STATUS_BADREQUEST); |
|
_sendResponse(queueId, message); |
|
} |
else | else |
{ | { |
// | // |