summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
Commit message (Collapse)AuthorAgeFilesLines
* WinTLS: Fix hang because of buffered received dataTatsuhiro Tsujikawa2016-01-301-1/+3
| | | | | | | | | | | | | WinTLSSession buffers received decrypted data into its own buffer. If read is requested, it copies the data from its buffer. But if requested buffer size is less than decrypted buffer, some of the data is left in the buffer. Previously, we had no facility to check the existence of this pending data. If this data is the last requested data from remote server, we may end up waiting for read event even if we have already data in our buffer, which may cause hang. This commit fixes this issue by introducing function to return the buffered length in TLSSession. SocketCore also provides the same function, which delegates to TLSSession object.
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-93/+91
|
* Return 400 status code if there is an error in RPC levelTatsuhiro Tsujikawa2015-09-211-1/+1
| | | | | 200 status code means success. Since the request did not succeed, we should avoid it.
* Return 200 HTTP status code if exception was caught while executing RPC methodTatsuhiro Tsujikawa2015-08-151-0/+4
| | | | | Previously, we returned 500 HTTP status code. I think the found in RPC level, not in HTTP protocol, so 500 is not appropriate.
* Use user-defined literals for time unitsTatsuhiro Tsujikawa2015-06-211-3/+2
|
* Replace timer facility with chrono libTatsuhiro Tsujikawa2015-06-091-3/+4
|
* Remove request pre-authorization againNils Maier2014-07-221-6/+2
|
* Delay auth failures instead of PBKDF2Nils Maier2014-07-221-12/+21
| | | | Closes GH-256
* Authorize RPC multicalls only once.Nils Maier2014-05-201-3/+10
| | | | | Cache the auth status afterwards and just assume the token still matches (within the same request, of course).
* Fix broken XMLRPC method callTatsuhiro Tsujikawa2013-08-121-2/+2
|
* Rewrite RPC method factory functionTatsuhiro Tsujikawa2013-07-111-2/+2
|
* Use std::unique_ptr for ValueBase object hierarchyTatsuhiro Tsujikawa2013-07-111-10/+7
|
* HttpServer: Return bool for receiveHeader, use std::unique_ptr for headersTatsuhiro Tsujikawa2013-06-291-2/+1
|
* HttpServer: Use std::unique_ptr for lastBody_ and headerProcessor_Tatsuhiro Tsujikawa2013-06-231-2/+2
|
* Use move to send string data into SocketBuffer::pushStrTatsuhiro Tsujikawa2013-06-231-4/+4
|
* Wrap Command object in std::unique_ptrTatsuhiro Tsujikawa2013-06-231-5/+4
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-9/+9
|
* RPC over SSL/TLS transportTatsuhiro Tsujikawa2012-09-301-2/+21
| | | | | | | To enable RPC over SSL/TLS, specify server certificate and private key using --rpc-certificate and --rpc-private-key options and enable --rpc-secure option. After the encryption is enabled, use https and wss scheme to access RPC server.
* Store only interesting HTTP headers in HttpHeaderTatsuhiro Tsujikawa2012-09-231-4/+4
| | | | | | In this change, we defined HTTP header fields we are interested in. We only store those headers in HttpHeader object. Accessing HTTP headers in HttpHeader object is now done through enum values.
* Parse HTTP RPC request on the fly without bufferingTatsuhiro Tsujikawa2012-07-141-23/+44
|
* Use PRId64 for int64_t format specifierTatsuhiro Tsujikawa2012-06-251-3/+3
|
* Added CORS preflight request support.Tatsuhiro Tsujikawa2012-06-231-0/+27
| | | | This change is based on the patch from binux.
* Return appropriate HTTP status code on RPC failure.Tatsuhiro Tsujikawa2012-05-191-2/+18
| | | | | | | In this change, we return 404 if the request path is neither /json-rpc nor /rpc. If XML feature is not enabled and /rpc is requested, return 404. If XML parser failed, return 400. JSON parser failure has been handled well in the existing code.
* Made WebSocket handshake more strict.Tatsuhiro Tsujikawa2012-03-251-4/+4
| | | | Refactored HttpServer as well.
* Added JSON-RPC over WebSocket.Tatsuhiro Tsujikawa2012-03-201-55/+5
| | | | Wslay library must be placed under deps/wslay.
* Use XmlParser for XML-RPC.Tatsuhiro Tsujikawa2011-11-111-3/+3
|
* Made toXml and toJson non-member function.Tatsuhiro Tsujikawa2011-10-181-2/+2
|
* Removed asString, asList, ... and use downcast<T> instead.Tatsuhiro Tsujikawa2011-09-261-5/+5
|
* wallclock is now retrieved using global::wallclock() call.Tatsuhiro Tsujikawa2011-08-101-2/+2
| | | | | This is necessary to avoid global variable initialization order problem.
* Moved jsonRpc flag from RpcMethod to RpcRequest.Tatsuhiro Tsujikawa2011-06-151-1/+1
| | | | Now RpcMethod is stateless, so we can cache and reuse them.
* Logged invoked RPC method name.Tatsuhiro Tsujikawa2011-06-071-0/+2
|
* Return text/javascript as Content-Type if jsoncallback is given.Tatsuhiro Tsujikawa2011-03-181-3/+13
|
* Removed logging RPC request.Tatsuhiro Tsujikawa2011-03-171-2/+0
|
* Fixed segmentation fault when JSON-RPC request cannot be parsed or isTatsuhiro Tsujikawa2011-03-161-3/+2
| | | | invalid.
* Renamed classes in abstract layer of RPC service from XmlRpc* to Rpc*.Tatsuhiro Tsujikawa2011-03-141-26/+30
| | | | | Now JSON-RPC is available by default regardless of XML library. XML-RPC becomes available when XML library is available.
* Added XmlRpcResponseTest. Set null as id if id is not sent.Tatsuhiro Tsujikawa2011-03-141-2/+1
| | | | | Removed unused XmlRpcResponse::toJsonBatch(). Set default value false to gzip argument of xmlrpc::toJsonBatch().
* Added JSONP support. Callback query parameter is "jsoncallback".Tatsuhiro Tsujikawa2011-03-141-3/+7
|
* Added JSON-RPC 2.0 batch call.Tatsuhiro Tsujikawa2011-03-101-41/+135
|
* Added initial JSON-RPC support.Tatsuhiro Tsujikawa2011-03-091-1/+55
| | | | | JSON-RPC is enabled using --enable-xml-rpc. We are implementing JSON-RPC based on JSON-RPC 2.0 draft spec.
* Check !SocketRecvBuffer::bufferEmpty() in ctor.Tatsuhiro Tsujikawa2011-01-161-1/+8
| | | | Also treat !SocketRecvBuffer::bufferEmpty() as data is available.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-2/+2
| | | | | | | | Use format specifier %lld for cuid_t. Defined cuid_t as long long int instead of int64_t, since g++ complains int64_t is not suitable for %lld.
* 2010-11-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-201-11/+12
| | | | | | | Rewritten Logger interface. Logger now writes source file name and line number in log file.
* 2010-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-141-4/+0
| | | | | | | | | Added .cc file for classes/structs that only provided by header file. Defined non-POD classes' ctor, dtor in .cc file. Moved implementation code in header file to .cc file for major classes/strucsts.
* 2010-06-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-211-20/+20
| | | | | | | Changed naming standards for class member variable: now it looks like var_ instead of _var.
* 2010-06-13 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-131-1/+1
| | | | | | | | | | | | Renamed member variables * src/HttpServerBodyCommand.cc * src/XmlRpcMethodImpl.cc * src/XmlRpcMethodImpl.h * src/XmlRpcRequest.h * test/XmlRpcMethodTest.cc * test/XmlRpcRequestProcessorTest.cc
* 2010-06-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-5/+6
| | | | | | | Made protected member variables of Command private. Added accessor funcs.
* 2010-06-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-06-081-4/+7
| | | | | | | Made public member variables of DownloadEngine private. Added accessor funcs.
* 2010-04-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-04-111-2/+2
| | | | | | | | Use clock_gettime(CLOCK_MONOTONIC, ...) if it is available and usable to prevent from aria2 from being affected by system time change.
* 2010-03-21 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-211-2/+5
| | | | | | | | Defined cuid_t as int64_t. Removed texts containing "CUID#%D" from translatable texts because it is used in log and debugging purpose.
* 2010-03-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-03-201-1/+1
| | | | | | Use cuid_t type for cuid.