W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2013

Re: [whatwg] Fetch: please review!

From: Peter Occil <poccil14@gmail.com>
Date: Sun, 26 May 2013 20:24:51 -0400
Message-ID: <4A8CDB58301D43ACA296B5E8D7DAF131@PeterPC>
To: <whatwg@lists.whatwg.org>
Step 7 of section 4.3 reads:

     Let headers be the names of request's author headers, sorted lexicographically and [[byte lowercased]]. 
     
Isn't the phrase "byte lowercased" rather easy to define, since each author header can only
contain ASCII characters?  Maybe it should be:

   7. Let headers be the names of request's author headers.
   7a. For each name in headers, convert that name to ASCII lowercase, and convert that name to a byte
       array by changing each code point to the corresponding byte.
   7b. Sort headers in ascending order using a byte-for-byte comparison.
     
---------------------   

FTP Responses
   
One issue box says "Map the result to response."  What exactly is the issue with mapping the result?
Should the response, including errors, be mapped to HTTP responses somehow?  Should FTP
errors (4xx and 5xx) be treated as "network errors"?

Also, the text ďFollow the requirements from FTP to retrieve a resourceĒ is rather vague. It seems 
thatís because it takes more steps to retrieve a file via FTP than via HTTP.  Implementations that donít 
have a higher-level FTP backend may find it harder to understand what those steps consist of.  Here is what I 
think are the steps.

- Connect to server
- If URL has username, send USER [username]
- If URL has password, send PASS [password]
- Send TYPE I (binary mode)
- Send CWD [path]
- Send RETR [filename]
- Send QUIT

Moreover, if the FTP URL points to merely a directory, itís unspecified what kind of resource should be returned.
Maybe a list of files (LIST or NLST command)?

--Peter
Received on Monday, 27 May 2013 00:25:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:59 UTC