2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that HTTP request header for XML-RPC request is not
	parsed properly.
	* src/HttpHeader.cc
	* src/HttpHeaderProcessor.cc
pull/1/head
Tatsuhiro Tsujikawa 2009-08-30 13:18:57 +00:00
parent 01af9a5df0
commit 19ae8f9d07
3 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,10 @@
2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that HTTP request header for XML-RPC request is not
parsed properly.
* src/HttpHeader.cc
* src/HttpHeaderProcessor.cc
2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2009-08-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that XML-RPC authorization might be done before HTTP Fixed the bug that XML-RPC authorization might be done before HTTP

View File

@ -33,10 +33,12 @@
*/ */
/* copyright --> */ /* copyright --> */
#include "HttpHeader.h" #include "HttpHeader.h"
#include <istream>
#include "Range.h" #include "Range.h"
#include "Util.h" #include "Util.h"
#include "A2STR.h" #include "A2STR.h"
#include <istream>
namespace aria2 { namespace aria2 {
@ -199,7 +201,7 @@ void HttpHeader::fill(std::istream& in)
while(std::getline(in, line)) { while(std::getline(in, line)) {
line = Util::trim(line); line = Util::trim(line);
if(line.empty()) { if(line.empty()) {
break; continue;
} }
std::pair<std::string, std::string> hp; std::pair<std::string, std::string> hp;
Util::split(hp, line, ':'); Util::split(hp, line, ':');

View File

@ -33,13 +33,15 @@
*/ */
/* copyright --> */ /* copyright --> */
#include "HttpHeaderProcessor.h" #include "HttpHeaderProcessor.h"
#include <sstream>
#include "HttpHeader.h" #include "HttpHeader.h"
#include "message.h" #include "message.h"
#include "Util.h" #include "Util.h"
#include "DlRetryEx.h" #include "DlRetryEx.h"
#include "DlAbortEx.h" #include "DlAbortEx.h"
#include "A2STR.h" #include "A2STR.h"
#include <sstream>
namespace aria2 { namespace aria2 {
@ -131,7 +133,7 @@ SharedHandle<HttpHeader> HttpHeaderProcessor::getHttpRequestHeader()
httpHeader->setMethod(firstLine[0]); httpHeader->setMethod(firstLine[0]);
httpHeader->setRequestPath(firstLine[1]); httpHeader->setRequestPath(firstLine[1]);
httpHeader->setVersion(firstLine[2]); httpHeader->setVersion(firstLine[2]);
std::istringstream strm(_buf.substr(14)); std::istringstream strm(_buf.substr(delimpos));
httpHeader->fill(strm); httpHeader->fill(strm);
return httpHeader; return httpHeader;
} }