Index: Makefile
===================================================================
RCS file: /cvs/ports/games/numptyphysics/Makefile,v
retrieving revision 1.7
diff -N -u -p Makefile
--- Makefile	10 Aug 2009 06:31:42 -0000	1.7
+++ Makefile	18 Oct 2009 15:32:54 -0000
@@ -4,8 +4,8 @@ COMMENT-main =		physics-based drawing puzzle game
 COMMENT-npcomplete =	extra levels for physics-based drawing puzzle game
 
 DISTNAME =		numptyphysics-0.3.r20090104
-PKGNAME-main =		${DISTNAME}p3
-PKGNAME-npcomplete =	npcomplete-0.0.r20090116
+PKGNAME-main =		${DISTNAME}p4
+PKGNAME-npcomplete =	npcomplete-0.0.r20090116p1
 
 MULTI_PACKAGES =	-main -npcomplete
 
Index: patches/patch-Array_h
===================================================================
RCS file: patches/patch-Array_h
diff -N -u -p patches/patch-Array_h
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Array_h	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+--- Array.h.orig	Mon Jun 23 17:34:19 2008
++++ Array.h	Thu Oct 15 14:39:45 2009
+@@ -31,18 +31,18 @@ class Array
+   
+  Array( int n, const T* d ) : m_data(NULL), m_size(0), m_capacity(0)
+   {
+-    if ( n ) {
++    if ( n > 0 ) {
+       capacity( n );
+-      memcpy( m_data, d, n * sizeof(T) );
++      if ( m_data ) memcpy( m_data, d, n * sizeof(T) );
+       m_size = n;
+     }
+   }
+ 
+   Array( const Array& other ) : m_data(NULL), m_size(0), m_capacity(0)
+   {
+-    if ( other.size() ) {
++    if ( other.size() > 0 ) {
+       capacity( other.size() );
+-      memcpy( m_data, other.m_data, other.size() * sizeof(T) );
++      if ( m_data ) memcpy( m_data, other.m_data, other.size() * sizeof(T) );
+       m_size = other.size();
+     }
+   }
Index: patches/patch-Canvas_cpp
===================================================================
RCS file: patches/patch-Canvas_cpp
diff -N -u -p patches/patch-Canvas_cpp
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Canvas_cpp	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,56 @@
+$OpenBSD$
+--- Canvas.cpp.orig	Sun Nov 16 16:50:27 2008
++++ Canvas.cpp	Fri Oct 16 13:41:23 2009
+@@ -661,23 +661,14 @@ void Window::setSubName( const char *sub )
+ 
+ Image::Image( const char* file, bool alpha )
+ {
+-  alpha = false;
+-  std::string f( "data/" );
++  std::string f( DEFAULT_RESOURCE_PATH "/" );
+   SDL_Surface* img = IMG_Load((f+file).c_str());
+-  if ( !img ) {
+-    f = std::string( DEFAULT_RESOURCE_PATH "/" );
+-    img = IMG_Load((f+file).c_str());
+-  }
+   if ( img ) {
+     printf("loaded image %s\n",(f+file).c_str());
+-    if ( alpha ) {
+-      m_state = SDL_DisplayFormatAlpha( img );
+-    } else {
+       m_state = SDL_DisplayFormat( img );
+ //       SDL_SetColorKey( SURFACE(this),
+ // 		       SDL_SRCCOLORKEY|SDL_RLEACCEL,
+ // 		       makeColour( 0x00ff00ff ) );
+-    }
+     if ( m_state ) {
+       SDL_FreeSurface( img );
+     } else {
+@@ -723,15 +714,24 @@ int Canvas::writeBMP( const char* filename ) const
+     Uint32 bpp;
+     bpp = SURFACE(this)->format->BytesPerPixel;
+ 
+-    fwrite( &head, 14, 1, f );
+-    fwrite( &info, 40, 1, f );
++    if ( fwrite( &head, 14, 1, f ) != 1 ) {
++	fclose( f );
++	return -1;
++    }
++    if ( fwrite( &info, 40, 1, f ) != 1 ) {
++	fclose( f );
++	return -1;
++    }
+     for ( int y=h-1; y>=0; y-- ) {
+       for ( int x=0; x<w; x++ ) {
+ 	int p = readPixel( x, y );
+ 	if ( bpp==2 ) {
+ 	  p = R16G16B16_TO_RGB888( R16(p), G16(p), B16(p) );
+ 	}
+-	fwrite( &p, 3, 1, f );
++	if ( fwrite( &p, 3, 1, f ) != 1 ) {
++	  fclose( f );
++	  return -1;
++	}
+       }
+     }
+     fclose(f);
Index: patches/patch-Canvas_h
===================================================================
RCS file: patches/patch-Canvas_h
diff -N -u -p patches/patch-Canvas_h
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Canvas_h	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- Canvas.h.orig	Thu Oct 15 08:59:08 2009
++++ Canvas.h	Thu Oct 15 08:59:56 2009
+@@ -68,7 +68,7 @@ class Window : public Canvas
+ class Image : public Canvas
+ {
+  public:
+-  Image( const char* file, bool alpha=false );
++  explicit Image( const char* file, bool alpha=false );
+ };
+ 
+ 
Index: patches/patch-Common_h
===================================================================
RCS file: patches/patch-Common_h
diff -N -u -p patches/patch-Common_h
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Common_h	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- Common.h.orig	Thu Oct 15 14:17:31 2009
++++ Common.h	Thu Oct 15 14:18:17 2009
+@@ -27,7 +27,7 @@
+ #define FIXED_TO_INT(iNT) ((iNT)>>FIXED_SHIFT)
+ 
+ struct Vec2 {
+-  Vec2() {}
++  Vec2() : x(0), y(0) {}
+   Vec2( const Vec2& o ) : x(o.x), y(o.y) {}
+   explicit Vec2( const b2Vec2& o ) : x((int)o.x), y((int)o.y) {}
+   Vec2( int xx, int yy ) : x(xx), y(yy) {}
Index: patches/patch-Config_h
===================================================================
RCS file: /cvs/ports/games/numptyphysics/patches/patch-Config_h,v
retrieving revision 1.1.1.1
diff -N -u -p patches/patch-Config_h
--- patches/patch-Config_h	28 Jan 2009 10:12:35 -0000	1.1.1.1
+++ patches/patch-Config_h	18 Oct 2009 15:32:54 -0000
@@ -1,6 +1,15 @@
 $OpenBSD: patch-Config_h,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $
---- Config.h.orig	Tue Jan 27 21:59:35 2009
-+++ Config.h	Tue Jan 27 21:59:47 2009
+--- Config.h.orig	Fri Oct 31 18:04:08 2008
++++ Config.h	Sun Oct 18 17:12:02 2009
+@@ -37,7 +37,7 @@
+ #  define CLICK_TOLERANCE   16 //PIXELs 
+ #else
+ #  define ITERATION_RATE    60 //fps
+-#  define RENDER_RATE       20 //fps
++#  define RENDER_RATE       60 //fps
+ #  define SOLVER_ITERATIONS 10
+ #  define JOINT_TOLERANCE   4.0f //PIXELs
+ #  define SELECT_TOLERANCE  5.0f //PIXELS_PER_METREf)
 @@ -51,7 +51,7 @@
  
  
Index: patches/patch-Game_cpp
===================================================================
RCS file: patches/patch-Game_cpp
diff -N -u -p patches/patch-Game_cpp
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Game_cpp	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,76 @@
+$OpenBSD$
+--- Game.cpp.orig	Tue Nov 11 17:54:38 2008
++++ Game.cpp	Fri Oct 16 13:39:01 2009
+@@ -29,11 +29,11 @@
+ #include <SDL/SDL_image.h>
+ 
+ #include <cstdio>
++#include <cerrno>
+ #include <iostream>
+ #include <sstream>
+ #include <fstream>
+ #include <memory.h>
+-#include <errno.h>
+ #include <sys/stat.h>
+ 
+ using namespace std;
+@@ -80,7 +80,7 @@ class Transform (public)
+     }
+   }
+ private:
+-  Transform() {}
++  Transform() : m_bypass(false) {}
+   bool m_bypass;
+   b2Mat22 m_rot;
+   b2Mat22 m_invrot;
+@@ -176,6 +176,7 @@ class Stroke (public)
+     m_attributes = 0;
+     m_origin = m_rawPath.point(0);
+     m_rawPath.translate( -m_origin );
++    m_body = NULL;
+     reset();
+   }  
+ 
+@@ -185,6 +186,7 @@ class Stroke (public)
+     m_colour = brushColours[DEFAULT_BRUSH];
+     m_attributes = 0;
+     m_origin = Vec2(400,240);
++    m_body = NULL;
+     reset();
+     const char *s = str.c_str();
+     while ( *s && *s!=':' && *s!='\n' ) {
+@@ -866,7 +868,7 @@ class DemoLog : public Array<DemoEntry> (public)
+   void appendFromString( const std::string& str ) 
+   {
+     const char *s = str.c_str();
+-    int t, o, v1, v2, v3;
++    int t, o = 0, v1, v2, v3;
+     char c;
+     SDL_Event ev = {0};
+     ev.type = 0xff;
+@@ -944,6 +946,12 @@ class DemoRecorder (private)
+ class DemoPlayer
+ {
+ public:
++  DemoPlayer()
++    : m_playing(false),
++      m_log(0),
++      m_index(0),
++      m_lastTick(0),
++      m_lastTickTime(0) {}
+ 
+   void start( const DemoLog* log ) 
+   {
+@@ -1555,11 +1563,7 @@ int npmain(int argc, char** argv)
+ 	}
+       } else {
+ 	struct stat st;
+-	if ( stat("Game.cpp",&st)==0 ) {
+-	  game.levels().addPath( "data" );
+-	} else {
+-	  game.levels().addPath( DEFAULT_LEVEL_PATH );
+-	}
++	game.levels().addPath( DEFAULT_LEVEL_PATH );
+ 	game.levels().addPath( Config::userDataDir().c_str() );
+       }
+       game.gotoLevel(0);
Index: patches/patch-Http_cpp
===================================================================
RCS file: /cvs/ports/games/numptyphysics/patches/patch-Http_cpp,v
retrieving revision 1.2
diff -N -u -p patches/patch-Http_cpp
--- patches/patch-Http_cpp	28 Jan 2009 15:14:55 -0000	1.2
+++ patches/patch-Http_cpp	18 Oct 2009 15:32:54 -0000
@@ -1,29 +1,78 @@
 $OpenBSD: patch-Http_cpp,v 1.2 2009/01/28 15:14:55 sthen Exp $
---- Http.cpp.orig	Thu Oct 23 09:51:17 2008
-+++ Http.cpp	Wed Jan 28 14:23:33 2009
-@@ -60,7 +60,7 @@ static bool parseUri( const char * uri,
+--- Http.cpp.orig	Thu Oct 23 10:51:17 2008
++++ Http.cpp	Thu Oct 15 17:59:28 2009
+@@ -15,6 +15,7 @@
+  */
+ 
+ #include <cstdlib>
++#include <cerrno>
+ #include <stdio.h>
+ #include <string.h>
+ 
+@@ -41,7 +42,10 @@ static void http_begin_cb( const Response* r, void* us
+ static void http_data_cb( const Response* r, void* userdata,
+ 		   const unsigned char* data, int numbytes )
+ {
+-  fwrite( data, 1, numbytes, ((Http*)userdata)->m_file );
++  size_t byteswritten;
++  if ( ( byteswritten = fwrite( data, 1, numbytes, ((Http*)userdata)->m_file ) ) != numbytes )
++    fprintf(stderr, "Wrote %d, should have written %d, http status=%d %s\n",
++	    byteswritten, numbytes, r->getstatus(), r->getreason());
+   ((Http*)userdata)->m_size += numbytes;
+ }
+ 
+@@ -60,7 +64,11 @@ static bool parseUri( const char * uri,
    if ( strncmp(uri,"http://",strlen("http://"))==0 ) {
      uri += strlen("http://");
    }
 -  strcpy(outHost,uri);
-+  strlcpy(outHost,uri,strlen(uri));
++  if (strlcpy(outHost,uri,sizeof(outHost)) >= sizeof(outHost)) {
++	errno = ENAMETOOLONG;
++	perror("strlcpy");
++  	return false;
++  }
    char* e = strchr(outHost,'/');
    *outPort = 80;
  
-@@ -72,7 +72,7 @@ static bool parseUri( const char * uri,
+@@ -72,7 +80,11 @@ static bool parseUri( const char * uri,
      *e = '\0';
      *outPort=atoi(e+1);
    }
 -  strcpy( outPath, strchr(uri,'/') );
-+  strlcpy( outPath, strchr(uri,'/'), strlen(strchr(uri,'/')));
++  if (strlcpy( outPath, strchr(uri,'/'), sizeof(outPath)) >= sizeof(outPath)) {
++	errno = ENAMETOOLONG;
++	perror("strlcpy");
++  	return false;
++  }
    fprintf(stderr,"Http::get host=%s port=%d file=%s\n",outHost,*outPort,outPath);
    return true;
  }
-@@ -103,7 +103,6 @@ bool Http::get( const char* uri,
+@@ -97,13 +109,12 @@ bool Http::get( const char* uri,
+ 	fprintf(stderr,"http_get pump\n");
+ 	con.pump();
+       }
+-    } catch ( Wobbly w ) {
++    } catch ( const Wobbly& w ) {
+       fprintf(stderr,"http_get wobbly: %s\n",w.what());
+     }
    }
  
    fclose ( m_file );
 -  free( host );
    return m_size > 0;
  }
+ 
+@@ -126,10 +137,12 @@ bool Http::post( const char* uri, const char*putname, 
+ 	fprintf(stderr,"http_get pump\n");
+ 	con.pump();
+       }
+-    } catch ( Wobbly w ) {
++    } catch ( const Wobbly& w ) {
+       fprintf(stderr,"http_get wobbly: %s\n",w.what());
++      return false;
+     }
+   }
++  return true;
+ }
+ 
  
Index: patches/patch-Http_h
===================================================================
RCS file: patches/patch-Http_h
diff -N -u -p patches/patch-Http_h
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Http_h	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+--- Http.h.orig	Thu Oct 15 14:04:11 2009
++++ Http.h	Thu Oct 15 14:05:21 2009
+@@ -13,6 +13,8 @@
+  * General Public License for more details.
+  *
+  */
++#ifndef NUMPHY_HTTP_H
++#define NUMPHY_HTTP_H
+ 
+ #include <stdio.h>
+ #include <string.h>
+@@ -36,5 +38,4 @@ class Http  (public)
+   std::string m_npid;
+ 
+ };
+-
+-
++#endif
Index: patches/patch-Levels_cpp
===================================================================
RCS file: patches/patch-Levels_cpp
diff -N -u -p patches/patch-Levels_cpp
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Levels_cpp	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,11 @@
+$OpenBSD$
+--- Levels.cpp.orig	Tue Nov 11 17:54:38 2008
++++ Levels.cpp	Thu Oct 15 18:05:58 2009
+@@ -84,6 +84,7 @@ bool Levels::addLevel( const string& file, int rank, i
+     if ( m_levels[i]->file == file
+ 	 && m_levels[i]->index == index ) {
+       printf("addLevel %s already present!\n",file.c_str());
++      delete e;
+       return false;
+     } else if ( m_levels[i]->rank > rank ) {
+       printf("addLevel %s at %d\n",file.c_str(),i);
Index: patches/patch-Levels_h
===================================================================
RCS file: patches/patch-Levels_h
diff -N -u -p patches/patch-Levels_h
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Levels_h	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,12 @@
+$OpenBSD$
+--- Levels.h.orig	Thu Oct 15 08:59:14 2009
++++ Levels.h	Thu Oct 15 09:00:25 2009
+@@ -24,7 +24,7 @@
+ class Levels
+ {
+  public:
+-  Levels( int numDirs=0, const char** dirs=NULL );
++  explicit Levels( int numDirs=0, const char** dirs=NULL );
+   bool addPath( const char* path );
+   bool addLevel( const std::string& file, int rank=-1, int index=-1 );
+   int  numLevels();
Index: patches/patch-Overlay_cpp
===================================================================
RCS file: patches/patch-Overlay_cpp
diff -N -u -p patches/patch-Overlay_cpp
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-Overlay_cpp	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,22 @@
+$OpenBSD$
+--- Overlay.cpp.orig	Thu Nov  6 14:44:45 2008
++++ Overlay.cpp	Thu Oct 15 14:49:47 2009
+@@ -31,6 +31,10 @@ class OverlayBase : public Overlay (public)
+     : m_game(game),
+       m_x(x), m_y(y),
+       m_canvas(NULL),
++      m_orgx(0),
++      m_orgy(0),
++      m_prevx(0),
++      m_prevy(0),
+       m_isDirty(true),
+       m_dragging(false),
+       m_dragging_allowed(dragging_allowed),
+@@ -176,6 +180,7 @@ class NextLevelOverlay : public IconOverlay (public)
+     : IconOverlay(game,"next.png",
+ 		  FULLSCREEN_RECT.centroid().x-200,
+ 		  FULLSCREEN_RECT.centroid().y-120),
++      m_selectedLevel(0),
+       m_levelIcon(-2),
+       m_icon(NULL)
+   {
Index: patches/patch-ZipFile_cpp
===================================================================
RCS file: patches/patch-ZipFile_cpp
diff -N -u -p patches/patch-ZipFile_cpp
--- /dev/null	18 Oct 2009 15:32:55 -0000
+++ patches/patch-ZipFile_cpp	18 Oct 2009 15:32:54 -0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+--- ZipFile.cpp.orig	Tue Nov 11 17:54:38 2008
++++ ZipFile.cpp	Thu Oct 15 14:14:50 2009
+@@ -110,16 +110,16 @@ int uncompress_int(unsigned char *dest, int *destLen, 
+ ZipFile::ZipFile(const std::string& fn)
+ {
+   m_temp = NULL;
+-  m_fd=open(fn.c_str(), O_RDONLY);
++  if ( m_fd=open(fn.c_str(), O_RDONLY) == -1) throw "open failed";
+   struct stat stat;
+-  fstat(m_fd, &stat);	  
++  if ( fstat(m_fd, &stat) != 0 ) throw "fstat failed";
+   m_dataLen = stat.st_size;
+   // TODO - win32
+   m_data = (unsigned char*)mmap(NULL,m_dataLen,PROT_READ,MAP_PRIVATE, m_fd, 0);
+   if ( !m_data ) throw "mmap failed";
+   if ( *(int*)&m_data[0] != 0x04034b50 ) throw "bad zip magic";
+   m_eoc = (zip_eoc*)&m_data[m_dataLen-sizeof(zip_eoc)];
+-  m_firstcd = (zip_cd*)&m_data[m_eoc->zipeofst];
++  m_firstcd = m_eoc ? (zip_cd*)&m_data[m_eoc->zipeofst] : 0;
+   if ( m_eoc && m_firstcd ) {
+     m_entries = m_eoc->zipenum;
+   } else {
Index: patches/patch-data_numptyphysics_desktop
===================================================================
RCS file: /cvs/ports/games/numptyphysics/patches/patch-data_numptyphysics_desktop,v
retrieving revision 1.1.1.1
diff -N -u -p patches/patch-data_numptyphysics_desktop
--- patches/patch-data_numptyphysics_desktop	28 Jan 2009 10:12:35 -0000	1.1.1.1
+++ patches/patch-data_numptyphysics_desktop	18 Oct 2009 15:32:54 -0000
@@ -1,9 +1,13 @@
 $OpenBSD: patch-data_numptyphysics_desktop,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $
---- data/numptyphysics.desktop.orig	Tue Jan 27 21:21:18 2009
-+++ data/numptyphysics.desktop	Tue Jan 27 21:22:00 2009
-@@ -4,10 +4,9 @@ Version=1.0
+--- data/numptyphysics.desktop.orig	Wed Nov 26 15:53:08 2008
++++ data/numptyphysics.desktop	Thu Oct 15 15:57:45 2009
+@@ -1,25 +1,12 @@
+ [Desktop Entry]
+-Encoding=UTF-8
+ Version=1.0
  Type=Application
  Name=Numpty Physics
++Comment=Physics based drawing puzzle game
  Categories=Game;LogicGame;
 -Exec=/usr/bin/numptyphysics
 +Exec=numptyphysics
@@ -12,4 +16,17 @@ $OpenBSD: patch-data_numptyphysics_desktop,v 1.1.1.1 2
 -X-Icon-path=/usr/share/pixmaps
  X-Window-Icon=numptyphysics
  X-Window-Icon-Dimmed=numptyphysics
- X-HildonDesk-ShowInToolbar=true
+-X-HildonDesk-ShowInToolbar=true
+-X-Osso-Type=application/x-executable
+-X-Osso-Service=org.maemo.garage.numptyphysics
+-MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection
+-
+-[X-Osso-URI-Actions]
+-http=X-Osso-URI-Action-Open;
+-nptp=X-Osso-URI-Action-Open;
+-
+-[X-Osso-URI-Action-Open]
+-Method=mime_open
+-Name=uri_link_play
+-TranslationDomain=osso-uri
++MimeType=application/x-numptyphysics-level;application/x-numptyphysics-collection;
Index: patches/patch-happyhttp_cpp
===================================================================
RCS file: /cvs/ports/games/numptyphysics/patches/patch-happyhttp_cpp,v
retrieving revision 1.1.1.1
diff -N -u -p patches/patch-happyhttp_cpp
--- patches/patch-happyhttp_cpp	28 Jan 2009 10:12:35 -0000	1.1.1.1
+++ patches/patch-happyhttp_cpp	18 Oct 2009 15:32:54 -0000
@@ -1,7 +1,29 @@
 $OpenBSD: patch-happyhttp_cpp,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $
---- happyhttp.cpp.orig	Thu Aug 28 11:08:27 2008
-+++ happyhttp.cpp	Tue Jan 27 13:47:09 2009
-@@ -357,7 +357,7 @@ void Connection::putrequest( const char* method, const
+--- happyhttp.cpp.orig	Thu Aug 28 12:08:27 2008
++++ happyhttp.cpp	Thu Oct 15 17:41:39 2009
+@@ -28,12 +28,12 @@
+ #include "happyhttp.h"
+ 
+ #ifndef WIN32
++	#include <cerrno>
+ //	#include <sys/types.h>
+ 	#include <sys/socket.h>
+ 	#include <netinet/in.h>
+ 	#include <arpa/inet.h>
+ 	#include <netdb.h>	// for gethostbyname()
+-	#include <errno.h>
+ #endif
+ 
+ #ifdef WIN32
+@@ -48,7 +48,6 @@
+ 
+ #include <string>
+ #include <vector>
+-#include <string>
+ #include <algorithm>
+ 
+ 
+@@ -357,7 +356,7 @@ void Connection::putrequest( const char* method, const
  	m_State = REQ_STARTED;
  
  	char req[ 512 ];
@@ -10,7 +32,7 @@ $OpenBSD: patch-happyhttp_cpp,v 1.1.1.1 2009/01/28 10:
  	m_Buffer.push_back( req );
  
  	putheader( "Host", m_Host.c_str() );	// required for HTTP1.1
-@@ -381,7 +381,7 @@ void Connection::putheader( const char* header, const 
+@@ -381,7 +380,7 @@ void Connection::putheader( const char* header, const 
  void Connection::putheader( const char* header, int numericvalue )
  {
  	char buf[32];
