mirror of https://github.com/aria2/aria2
2009-05-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
In XML-RPC option struct, header and index-out option can take array as value. * src/XmlRpcMethod.ccpull/1/head
parent
cdd65e8cca
commit
dd6d098ccb
|
@ -1,3 +1,9 @@
|
||||||
|
2009-05-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
In XML-RPC option struct, header and index-out option can take
|
||||||
|
array as value.
|
||||||
|
* src/XmlRpcMethod.cc
|
||||||
|
|
||||||
2009-05-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-05-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Removed unused option member from PeerConnection.
|
Removed unused option member from PeerConnection.
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
#include "array_fun.h"
|
#include "array_fun.h"
|
||||||
#include "download_helper.h"
|
#include "download_helper.h"
|
||||||
#include "XmlRpcRequest.h"
|
#include "XmlRpcRequest.h"
|
||||||
|
#include "prefs.h"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
|
@ -182,9 +183,17 @@ void XmlRpcMethod::gatherRequestOption
|
||||||
i != listRequestOptions().end(); ++i) {
|
i != listRequestOptions().end(); ++i) {
|
||||||
if(optionsDict.containsKey(*i)) {
|
if(optionsDict.containsKey(*i)) {
|
||||||
const BDE& value = optionsDict[*i];
|
const BDE& value = optionsDict[*i];
|
||||||
if(value.isString()) {
|
SharedHandle<OptionHandler> optionHandler = _optionParser->findByName(*i);
|
||||||
_optionParser->findByName(*i)->parse
|
// header and index-out option can take array as value
|
||||||
(*option.get(), value.s());
|
if((*i == PREF_HEADER || *i == PREF_INDEX_OUT) && value.isList()) {
|
||||||
|
for(BDE::List::const_iterator argiter = value.listBegin();
|
||||||
|
argiter != value.listEnd(); ++argiter) {
|
||||||
|
if((*argiter).isString()) {
|
||||||
|
optionHandler->parse(*option.get(), (*argiter).s());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if(value.isString()) {
|
||||||
|
optionHandler->parse(*option.get(), value.s());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue