}
}
-/*
+/**
* This creates the error page itself.. its likely
* that the forward ported reply header max size patch
* generates non http conformant error pages - in which
void
HttpStateData::processReplyHeader()
{
- /* Creates a blank header. If this routine is made incremental, this will
- * not do
- */
+ /** Creates a blank header. If this routine is made incremental, this will not do */
Ctx ctx = ctx_enter(entry->mem_obj->url);
debugs(11, 3, "processReplyHeader: key '" << entry->getMD5Text() << "'");
ctx_exit(ctx);
return;
}
-
+
if (!parsed) { // need more data
assert(!error);
assert(!eof);
ctx_exit(ctx);
return;
}
-
+
debugs(11, 9, "GOT HTTP REPLY HDR:\n---------\n" << readBuf->content() << "\n----------");
-
+
header_bytes_read = headersEnd(readBuf->content(), readBuf->contentSize());
readBuf->consume(header_bytes_read);
}
processSurrogateControl (vrep);
- /* TODO: IF the reply is a 1.0 reply, AND it has a Connection: Header
+ /** \todo IF the reply is a 1.0 reply, AND it has a Connection: Header
* Parse the header and remove all referenced headers
*/
HttpStateData::statusIfComplete() const
{
const HttpReply *rep = virginReply();
- /* If the reply wants to close the connection, it takes precedence */
+ /** \par
+ * If the reply wants to close the connection, it takes precedence */
if (httpHeaderHasConnDir(&rep->header, "close"))
return COMPLETE_NONPERSISTENT_MSG;
- /* If we didn't send a keep-alive request header, then this
+ /** \par
+ * If we didn't send a keep-alive request header, then this
* can not be a persistent connection.
*/
if (!flags.keepalive)
return COMPLETE_NONPERSISTENT_MSG;
- /*
+ /** \par
* If we haven't sent the whole request then this can not be a persistent
* connection.
*/
return COMPLETE_NONPERSISTENT_MSG;
}
- /*
+ /** \par
* What does the reply have to say about keep-alive?
*/
- /*
- * XXX BUG?
+ /**
+ \bug XXX BUG?
* If the origin server (HTTP/1.0) does not send a keep-alive
* header, but keeps the connection open anyway, what happens?
* We'll return here and http.c waits for an EOF before changing
PROF_stop(HttpStateData_readReply);
}
*/
+
/* XXX this function is too long! */
void
HttpStateData::readReply (const CommIoCbParams &io)
IOStats.Http.read_hist[bin]++;
}
- /* here the RFC says we should ignore whitespace between replies, but we can't as
+ /** \par
+ * Here the RFC says we should ignore whitespace between replies, but we can't as
* doing so breaks HTTP/0.9 replies beginning with witespace, and in addition
* the response splitting countermeasures is extremely likely to trigger on this,
* not allowing connection reuse in the first place.
PROF_stop(HttpStateData_processReplyBody);
}
-// Checks whether we can continue with processing the body or doing ICAP.
-// Returns false if we cannot (e.g., due to lack of headers or errors).
+/**
+ \retval true if we can continue with processing the body or doing ICAP.
+ */
bool
HttpStateData::continueAfterParsingHeader()
{
- if (!flags.headers_parsed && !eof) { // need more and may get more
+ if (!flags.headers_parsed && !eof) {
debugs(11, 9, HERE << "needs more at " << readBuf->contentSize());
flags.do_next_read = 1;
+ /** \retval false If we have not finished parsing the headers and may get more data.
+ * Schedules more reads to retrieve the missing data.
+ */
maybeReadVirginBody(); // schedules all kinds of reads; TODO: rename
- return false; // wait for more data
+ return false;
}
- /* we are done with parsing, now check for errors */
+ /** If we are done with parsing, check for errors */
err_type error = ERR_NONE;
return false; // quit on error
}
-/*
+/**
* Call this when there is data from the origin server
* which should be sent to either StoreEntry, or to ICAP...
*/
return status;
}
-/*
+/**
* processReplyBody has two purposes:
* 1 - take the reply body data, if any, and put it into either
* the StoreEntry, or give it over to ICAP.
if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) {
/*
- * the above writeReplyBody() call could ABORT this entry,
+ * The above writeReplyBody() call could ABORT this entry,
* in that case, the server FD should already be closed.
* there's nothing for us to do.
*/
deleteThis("HttpStateData::abortTransaction");
}
+#if DEAD_CODE
void
httpBuildVersion(HttpVersion * version, unsigned int major, unsigned int minor)
{
version->major = major;
version->minor = minor;
}
+#endif
HttpRequest *
HttpStateData::originalRequest()