mirror of https://github.com/aria2/aria2
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.ccpull/1/head
parent
01af9a5df0
commit
19ae8f9d07
|
@ -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>
|
||||
|
||||
Fixed the bug that XML-RPC authorization might be done before HTTP
|
||||
|
|
|
@ -33,10 +33,12 @@
|
|||
*/
|
||||
/* copyright --> */
|
||||
#include "HttpHeader.h"
|
||||
|
||||
#include <istream>
|
||||
|
||||
#include "Range.h"
|
||||
#include "Util.h"
|
||||
#include "A2STR.h"
|
||||
#include <istream>
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
@ -199,7 +201,7 @@ void HttpHeader::fill(std::istream& in)
|
|||
while(std::getline(in, line)) {
|
||||
line = Util::trim(line);
|
||||
if(line.empty()) {
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
std::pair<std::string, std::string> hp;
|
||||
Util::split(hp, line, ':');
|
||||
|
|
|
@ -33,13 +33,15 @@
|
|||
*/
|
||||
/* copyright --> */
|
||||
#include "HttpHeaderProcessor.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "HttpHeader.h"
|
||||
#include "message.h"
|
||||
#include "Util.h"
|
||||
#include "DlRetryEx.h"
|
||||
#include "DlAbortEx.h"
|
||||
#include "A2STR.h"
|
||||
#include <sstream>
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
@ -131,7 +133,7 @@ SharedHandle<HttpHeader> HttpHeaderProcessor::getHttpRequestHeader()
|
|||
httpHeader->setMethod(firstLine[0]);
|
||||
httpHeader->setRequestPath(firstLine[1]);
|
||||
httpHeader->setVersion(firstLine[2]);
|
||||
std::istringstream strm(_buf.substr(14));
|
||||
std::istringstream strm(_buf.substr(delimpos));
|
||||
httpHeader->fill(strm);
|
||||
return httpHeader;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue