Home | History | Annotate | Download | only in http

Lines Matching refs:headers

21 // The headers that we have to process.
26 void AddRangeHeader(int64 start, int64 end, HttpRequestHeaders* headers) {
34 headers->SetHeader(
124 bool PartialData::Init(const HttpRequestHeaders& headers) {
126 if (!headers.GetHeader(HttpRequestHeaders::kRange, &range_header))
146 void PartialData::SetHeaders(const HttpRequestHeaders& headers) {
148 extra_headers_.CopyFrom(headers);
151 void PartialData::RestoreHeaders(HttpRequestHeaders* headers) const {
156 headers->CopyFrom(extra_headers_);
158 AddRangeHeader(current_range_start_, end, headers);
201 HttpRequestHeaders* headers) {
209 headers->CopyFrom(extra_headers_);
224 headers);
227 AddRangeHeader(current_range_start_, cached_start_ - 1, headers);
239 bool PartialData::UpdateFromStoredHeaders(const HttpResponseHeaders* headers,
244 DCHECK_EQ(headers->response_code(), 200);
252 int64 total_length = headers->GetContentLength();
253 if (total_length <= 0 || !headers->HasStrongValidators())
268 if (headers->response_code() == 200) {
276 if (!headers->HasStrongValidators())
279 int64 length_value = headers->GetContentLength();
319 bool PartialData::ResponseHeadersOK(const HttpResponseHeaders* headers) {
320 if (headers->response_code() == 304) {
330 if (!headers->GetContentRange(&start, &end, &total_length))
335 int64 content_length = headers->GetContentLength();
369 void PartialData::FixResponseHeaders(HttpResponseHeaders* headers,
374 headers->RemoveHeader(kLengthHeader);
375 headers->RemoveHeader(kRangeHeader);
381 headers->ReplaceStatusLine("HTTP/1.1 206 Partial Content");
389 headers->ReplaceStatusLine(
396 headers->AddHeader(
401 headers->ReplaceStatusLine("HTTP/1.1 200 OK");
406 headers->AddHeader(base::StringPrintf("%s: %" PRId64, kLengthHeader,
410 void PartialData::FixContentLength(HttpResponseHeaders* headers) {
411 headers->RemoveHeader(kLengthHeader);
412 headers->AddHeader(base::StringPrintf("%s: %" PRId64, kLengthHeader,