You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Dean Gaudet <dg...@hyperreal.org> on 1997/08/19 09:52:46 UTC
cvs commit: apachen/src/core http_request.c httpd.h
dgaudet 97/08/19 00:52:44
Modified: src/core http_request.c httpd.h
Log:
Fix a bug introduced by Ben's canonical name patch. And avoid a strdup
that's not necessary.
Revision Changes Path
1.78 +1 -1 apachen/src/core/http_request.c
Index: http_request.c
===================================================================
RCS file: /export/home/cvs/apachen/src/core/http_request.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- http_request.c 1997/08/18 10:59:04 1.77
+++ http_request.c 1997/08/19 07:52:42 1.78
@@ -261,7 +261,7 @@
* fake one. But don't run through the directory entries.
*/
- if (test_filename == NULL) {
+ if (r->filename == NULL) {
r->filename = pstrdup(r->pool, r->uri);
r->finfo.st_mode = 0; /* Not really a file... */
r->per_dir_config = per_dir_defaults;
1.141 +3 -3 apachen/src/core/httpd.h
Index: httpd.h
===================================================================
RCS file: /export/home/cvs/apachen/src/core/httpd.h,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- httpd.h 1997/08/18 10:59:04 1.140
+++ httpd.h 1997/08/19 07:52:42 1.141
@@ -832,10 +832,10 @@
API_EXPORT(void) chdir_file(const char *file);
#ifndef HAVE_CANONICAL_FILENAME
-#define os_canonical_filename(p,f) pstrdup(p,f)
-#endif
-
+#define os_canonical_filename(p,f) (f)
+#else
API_EXPORT(char *)os_canonical_filename(pool *p,const char *file);
+#endif
char *get_local_host(pool *);
unsigned long get_virthost_addr (const char *hostname, unsigned short *port);
Re: cvs commit: apachen/src/core http_request.c httpd.h
Posted by Dean Gaudet <dg...@arctic.org>.
I suppose ... but ... I hate wasting memory at the rate we waste memory :)
BTW whatever happened to doing things component by component during
directory_walk and totally ignoring shortnames?
Dean
On Tue, 19 Aug 1997, Ben Laurie wrote:
> Dean Gaudet wrote:
> >
> > dgaudet 97/08/19 00:52:44
> >
> > Modified: src/core http_request.c httpd.h
> > Log:
> > Fix a bug introduced by Ben's canonical name patch. And avoid a strdup
> > that's not necessary.
>
> I think the avoided strdup is a mistake - if os_canonical_filename
> strdups on _any_ platform, it should do so on all. Hmmm ... or it should
> be documented that it may or may not strdup.
>
> Cheers,
>
> Ben.
>
> --
> Ben Laurie |Phone: +44 (181) 994 6435|Apache Group member
> Freelance Consultant |Fax: +44 (181) 994 6472|http://www.apache.org
> and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
> A.L. Digital Ltd, |http://www.algroup.co.uk/Apache-SSL
> London, England. |"Apache: TDG" http://www.ora.com/catalog/apache
>
Re: cvs commit: apachen/src/core http_request.c httpd.h
Posted by Ben Laurie <be...@algroup.co.uk>.
Dean Gaudet wrote:
>
> dgaudet 97/08/19 00:52:44
>
> Modified: src/core http_request.c httpd.h
> Log:
> Fix a bug introduced by Ben's canonical name patch. And avoid a strdup
> that's not necessary.
I think the avoided strdup is a mistake - if os_canonical_filename
strdups on _any_ platform, it should do so on all. Hmmm ... or it should
be documented that it may or may not strdup.
Cheers,
Ben.
--
Ben Laurie |Phone: +44 (181) 994 6435|Apache Group member
Freelance Consultant |Fax: +44 (181) 994 6472|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd, |http://www.algroup.co.uk/Apache-SSL
London, England. |"Apache: TDG" http://www.ora.com/catalog/apache