mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-11 00:56:37 +00:00
4f43cff5ca
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing Let's also move net while we're at it. Move the ZIM/PNG loaders over to Common. Move the UI framework into Common iOS buildfix * Buildfix * Buildfixes * Apple buildfix * This typo again.. * UWP buildfix * Fix build of PPSSPPQt, such as it is (it's not in good condition...) * Guess what? Another buildfix.
51 lines
978 B
C++
51 lines
978 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
#include "Common/Buffer.h"
|
|
|
|
namespace net {
|
|
class InputSink;
|
|
};
|
|
|
|
namespace http {
|
|
|
|
class RequestHeader {
|
|
public:
|
|
RequestHeader();
|
|
~RequestHeader();
|
|
// Public variables since it doesn't make sense
|
|
// to bother with accessors for all these.
|
|
int status;
|
|
// Intentional misspelling.
|
|
char *referer;
|
|
char *user_agent;
|
|
char *resource;
|
|
char *params;
|
|
int content_length;
|
|
std::unordered_map<std::string, std::string> other;
|
|
enum RequestType {
|
|
SIMPLE, FULL,
|
|
};
|
|
RequestType type;
|
|
enum Method {
|
|
GET,
|
|
HEAD,
|
|
POST,
|
|
UNSUPPORTED,
|
|
};
|
|
Method method;
|
|
bool ok;
|
|
void ParseHeaders(net::InputSink *sink);
|
|
bool GetParamValue(const char *param_name, std::string *value) const;
|
|
bool GetOther(const char *name, std::string *value) const;
|
|
private:
|
|
int ParseHttpHeader(const char *buffer);
|
|
bool first_header_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(RequestHeader);
|
|
};
|
|
|
|
} // namespace http
|