You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Niklas Gustavsson <ni...@protocol7.com> on 2005/07/14 20:18:58 UTC

[net] FTP sends incorrect type for EBCDIC

Hi

When issuing ftp.type(FTP.EBCDIC_FILE_TYPE), FTP will send "TYPE B". 
This is not correct according to RFC 959 where the EBCDIC type is 
specified as "E".

The attached patch should resolve this issue.

/niklas

Re: [net] FTP sends incorrect type for EBCDIC

Posted by Niklas Gustavsson <ni...@protocol7.com>.
Daniel F. Savarese wrote:
> In message <db...@sea.gmane.org>, Niklas Gustavsson writes:
> 
>>Fair enough, but if it is treated as binary, shouldn't the type be "I"?
> 
> 
> That's what I get for not doing my homework :)  Okay, so I have no idea
> why it is sending B (other than it being a mistake).  I'm not even sure
> why I thought the spec required ASCII/EBCDIC translation, since it says:
>   "For transmission, the data are represented as 8-bit EBCDIC characters."
> I'll change it to E whenever the source repository is accessible again.

Great, thanks!

/niklas


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [net] FTP sends incorrect type for EBCDIC

Posted by Niklas Gustavsson <ni...@protocol7.com>.
Daniel F. Savarese wrote:
> In message <db...@sea.gmane.org>, Niklas Gustavsson writes:
> 
>>When issuing ftp.type(FTP.EBCDIC_FILE_TYPE), FTP will send "TYPE B". 
>>This is not correct according to RFC 959 where the EBCDIC type is 
>>specified as "E".
> 
> 
> I'm pretty sure sending B is intentional since we do not perform automatic
> translaton between EBCDIC and ASCII.  Therefore, EBCDIC is treated as a
> binary file not subject to the automatic translation required by the FTP
> spec.  It's probably not useful to make a change unless the character
> translation is implemented.  However, I'm speaking purely from memory and
> not from revisiting the code and RFC.

Fair enough, but if it is treated as binary, shouldn't the type be "I"?

/niklas


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org