gopher.cc
Go to the documentation of this file.
377 storeAppendPrintf(e, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
381 storeAppendPrintf(e, "<STYLE type=\"text/css\"><!--BODY{background-color:#ffffff;font-family:verdana,sans-serif}--></STYLE>\n");
494 debugs(10, DBG_IMPORTANT, "GopherHTML: Buffer overflow. Lost some data on URL: " << entry->url() );
637 outbuf.appendf("</PRE><HR noshade size=\"1px\"><H2>Record# %d<br><i>%s</i></H2>\n<PRE>", recno, html_quote(result));
701 gopherState->fwd->fail(new ErrorState(ERR_READ_TIMEOUT, Http::scGatewayTimeout, gopherState->fwd->request, gopherState->fwd->al));
712 gopherReadReply(const Comm::ConnectionPointer &conn, char *buf, size_t len, Comm::Flag flag, int xerrno, void *data)
784 const auto err = new ErrorState(ERR_READ_ERROR, Http::scInternalServerError, gopherState->fwd->request, gopherState->fwd->al);
790 gopherState->fwd->fail(new ErrorState(ERR_ZERO_SIZE_OBJECT, Http::scServiceUnavailable, gopherState->fwd->request, gopherState->fwd->al));
836 AsyncCall::Pointer readCall = commCbCall(5, 5, "gopherReadReply", CommIoCbPtrFun(gopherReadReply, gopherState));
844 gopherSendComplete(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag errflag, int xerrno, void *data)
864 const auto err = new ErrorState(ERR_WRITE_ERROR, Http::scServiceUnavailable, gopherState->fwd->request, gopherState->fwd->al);
struct SquidConfig::@96 Timeout
static void gopher_request_parse(const HttpRequest *req, char *type_id, char *request)
Definition: gopher.cc:311
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
Definition: comm.cc:921
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
Definition: gopher.cc:82
Definition: CommCalls.h:277
bool overflowed
some received bytes ignored due to internal buffer capacity limits
Definition: gopher.cc:129
int commSetConnTimeout(const Comm::ConnectionPointer &conn, int timeout, AsyncCall::Pointer &callback)
Definition: comm.cc:563
static void gopherToHTML(GopherStateData *, char *inbuf, int len)
Definition: gopher.cc:420
IoStats IOStats
struct IoStats::@78 Gopher
void replaceHttpReply(const HttpReplyPointer &, const bool andStartWriting=true)
Definition: store.cc:1683
struct StatCounters::@128 server
Definition: Range.h:19
void comm_read(const Comm::ConnectionPointer &conn, char *buf, int len, AsyncCall::Pointer &callback)
Definition: Read.h:59
UnaryCbdataDialer< Argument1 > cbdataDialer(typename UnaryCbdataDialer< Argument1 >::Handler *handler, Argument1 *arg1)
Definition: AsyncCbdataCalls.h:40
Definition: HttpRequest.h:49
char const * visible_appname_string
Definition: MemBuf.h:24
void IOCB(const Comm::ConnectionPointer &conn, char *, size_t size, Comm::Flag flag, int xerrno, void *data)
Definition: CommCalls.h:36
CommCbFunPtrCallT< Dialer > * commCbCall(int debugSection, int debugLevel, const char *callName, const Dialer &dialer)
Definition: CommCalls.h:342
Definition: FwdState.h:54
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
Definition: Write.cc:33
Definition: Tokenizer.h:30
size_t bytesWanted(Range< size_t > const aRange, bool ignoreDelayPool=false) const
Definition: store.cc:210
int64_t bodyBytesRead
number of body bytes received from the next hop or -1
Definition: HierarchyLogEntry.h:71
Definition: HttpReply.h:25
Definition: Store.h:42
static void gopherHTMLHeader(StoreEntry *e, const char *title, const char *substring)
Definition: gopher.cc:375
Definition: parse.c:160
Definition: DelayId.h:22
struct StatCounters::@128::@138 all
AsyncCall * asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
Definition: AsyncCall.h:154
void Controller::create() STUB void Controller Controller nil
Definition: stub_libstore.cc:19
Definition: CommCalls.h:139
Definition: CommCalls.h:133
virtual void append(char const *, int)
Appends a c-string to existing packed data.
Definition: store.cc:778
optimized set of C chars, with quick membership test and merge support
Definition: CharacterSet.h:18
Definition: errorpage.h:87
void setHeaders(Http::StatusCode status, const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires)
Definition: HttpReply.cc:167
void markStoredReplyAsWhole(const char *whyWeAreSure)
Definition: FwdState.cc:606
Definition: CommCalls.h:246
enum GopherStateData::@71 conversion
Comm::ConnectionPointer const & serverConnection() const
Definition: FwdState.h:106
struct StatCounters::@128::@138 other