--- parser3/src/classes/image.C 2001/09/06 06:11:13 1.40 +++ parser3/src/classes/image.C 2001/09/14 15:41:59 1.42 @@ -5,9 +5,9 @@ Author: Alexander Petrosyan (http://design.ru/paf) - $Id: image.C,v 1.40 2001/09/06 06:11:13 parser Exp $ + $Id: image.C,v 1.42 2001/09/14 15:41:59 parser Exp $ */ -static const char *RCSId="$Id: image.C,v 1.40 2001/09/06 06:11:13 parser Exp $"; +static const char *RCSId="$Id: image.C,v 1.42 2001/09/14 15:41:59 parser Exp $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -334,7 +334,7 @@ static gdImage *load(Request& r, const S const String& file_name){ Pool& pool=r.pool(); - const char *file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_NAME); + const char *file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_SPEC); if(FILE *f=fopen(file_name_cstr, "rb")) { gdImage& image=*new(pool) gdImage(pool); bool ok=image.CreateFromGif(f); @@ -393,9 +393,9 @@ static void _gif(Request& r, const Strin String out(pool); image->Gif(out); VFile& vfile=*new(pool) VFile(pool); - String& image_gif=*new(pool) String(pool, "image/gif"); + Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif")); vfile.set(false/*not tainted*/, - out.cstr(String::UL_AS_IS), out.size(), 0, &image_gif); + out.cstr(String::UL_AS_IS), out.size(), 0, content_type); r.write_no_lang(vfile); }