Re: [Review] Route stat() family of calls via wrapper ops.
| From: | Sara Golemon | Date: | Tue, 12 Aug 2003 18:36:46 +0000 |
| Subject: | Re: [Review] Route stat() family of calls via wrapper ops. | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3871@lists.php.net to get a copy of this message | ||
>> http:// wrapper:
>> is_writable() would always return false.
>> is_readable() would return true *IF* a HEAD request returned 2xx or
>> 3xx is_executable() would always return false.
>> file_exists() would return true if a HEAD request returned 2xx, 3xx,
>> or
>> 4xx (not including 404)
>
> I wouldn't agree there:
> http://www.example.com/file with spaces.png [1]
>
> returns invalid method: 400. I think the entire 4xx and 5xx family
> should return false.
>
*blink* Did I write that? Musta been talking to someone while I was doing
it. Yes, I agree, only 2xx and 3xx should return true.
> As for 30[12], what happens when the refered document does not exist?
> Symlinks have a maximum number of links and return ELOOP. Does the same
> apply to 302 and what is the value of MAXSYMLINKS (sys/param.h) in that
> case?
>
I couldn't say without double checking the code, but there's a forward
limit in http_fopen_wrapper which limits how far the http wrapper will go
in following redirects. If that limit is reached the stat would fail or
the is_readable would return false. (Just as it would for plainfiles)
-Sara