19 #ifndef NET_INSTAWEB_HTTP_PUBLIC_HTTP_RESPONSE_PARSER_H_
20 #define NET_INSTAWEB_HTTP_PUBLIC_HTTP_RESPONSE_PARSER_H_
25 #include "net/instaweb/http/public/response_headers_parser.h"
29 namespace net_instaweb {
32 class ResponseHeaders;
40 MessageHandler* handler)
41 : reading_headers_(
true),
43 response_headers_(response_headers),
46 parser_(response_headers) {
50 bool ParseFile(FileSystem::InputFile* file);
54 bool Parse(FILE* stream);
60 bool ok()
const {
return ok_; }
61 bool headers_complete()
const {
return parser_.headers_complete(); }
64 bool reading_headers_;
66 ResponseHeaders* response_headers_;
68 MessageHandler* handler_;
69 ResponseHeadersParser parser_;
bool ParseChunk(const StringPiece &data)
bool ParseFile(FileSystem::InputFile *file)
Parse complete HTTP response from a file.
Definition: http_response_parser.h:37