Author: jgg
Date: 2001-05-27 23:53:55 GMT
G++3 fixes from Randolph
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: http.cc,v 1.51 2001/03/13 06:51:46 jgg Exp $
+// $Id: http.cc,v 1.52 2001/05/27 23:53:55 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
#include <signal.h>
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <stdio.h>
#include <errno.h>
+#include <string.h>
+#include <iostream>
// Internet stuff
#include <netdb.h>
// Internet stuff
#include <netdb.h>
#include "http.h"
/*}}}*/
#include "http.h"
/*}}}*/
string HttpMethod::FailFile;
int HttpMethod::FailFd = -1;
string HttpMethod::FailFile;
int HttpMethod::FailFd = -1;
unsigned long Sz = LeftRead();
if (OutQueue.length() - StrPos < Sz)
Sz = OutQueue.length() - StrPos;
unsigned long Sz = LeftRead();
if (OutQueue.length() - StrPos < Sz)
Sz = OutQueue.length() - StrPos;
- memcpy(Buf + (InP%Size),OutQueue.begin() + StrPos,Sz);
+ memcpy(Buf + (InP%Size),OutQueue.c_str() + StrPos,Sz);
{
string::const_iterator J = I;
for (; J != Data.end() && *J != '\n' && *J != '\r';J++);
{
string::const_iterator J = I;
for (; J != Data.end() && *J != '\n' && *J != '\r';J++);
- if (HeaderLine(string(I,J-I)) == false)
+ if (HeaderLine(string(I,J)) == false)
string Tag = string(Line,0,Pos);
string Val = string(Line,Pos2);
string Tag = string(Line,0,Pos);
string Val = string(Line,Pos2);
- if (stringcasecmp(Tag.begin(),Tag.begin()+4,"HTTP") == 0)
+ if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0)
{
// Evil servers return no version
if (Line[4] == '/')
{
// Evil servers return no version
if (Line[4] == '/')
// -*- mode: cpp; mode: fold -*-
// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/// $Id: http.h,v 1.10 2001/03/06 07:15:29 jgg Exp $
-// $Id: http.h,v 1.10 2001/03/06 07:15:29 jgg Exp $
+// Description /*{{{*/// $Id: http.h,v 1.11 2001/05/27 23:53:56 jgg Exp $
+// $Id: http.h,v 1.11 2001/05/27 23:53:56 jgg Exp $
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
/* ######################################################################
HTTP Aquire Method - This is the HTTP aquire method for APT.
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
class HttpMethod;
class CircleBuf
class HttpMethod;
class CircleBuf