From: Colin P. A. <co...@co...> - 2007-12-07 13:35:52
|
>>>>> "Berend" == Berend de Boer <be...@po...> writes: >>>>> "Colin" == Colin Paul Adams <co...@co...> writes: Colin> In the HTTP URI resolver, I am passing {UT_URI}.path to Colin> {EPX_HTTP_10_CLIENT}.get. Colin> Who is wrong here? Is it the implementation of Colin> {UT_URI}.path, or should the HTTP resolver be checking for Colin> an empty path, and passing "/" in that case? Berend> Looks to me a job for the resolver. You could make it a Berend> convention, but I think the EPX_HTTP_10_CLIENT expects a Berend> path. Empty string isn't a path. You could go for Berend> convention in that case, but in the case of Eiffel I'm Berend> usually not fond of conventions, rather have explicit Berend> instructions. I agree with almost everything there. Empty string IS a path (from RFC 2986): path = path-abempty ; begins with "/" or is empty / path-absolute ; begins with "/" but not "//" / path-noscheme ; begins with a non-colon segment / path-rootless ; begins with a segment / path-empty ; zero characters So I think EPX_HTTP_10_CLIENT SHOULD accept empty string. After all, what is one supposed to do if an HTTP server were actually to distinguish between the two requests (as far as I can see from reading RFC 2616, this is legitimate)? In any case I think you ought to explicitly document this behaviour. Anyway, I will alter the http resolver to change "" to "/" (we must have an absolute URI here, so the change is safe providing the server doesn't distinguish between them) for now, and the same for the ftp resolver, and send you the patches. -- Colin Adams Preston Lancashire |