Re: [apps-discuss] content inspection in absence of media type, was: APPSDIR review of draft-ietf-httpbis-p2-semantics-24

On 2013/10/30 18:47, Julian Reschke wrote:
> On 2013-10-30 09:51, "Martin J. Dürst" wrote:
>> I have to say that I don't consider this sentence to be useless.
>>
>> As far as I remember, there are other specs (mail?) that say that
>> text/plain is the default. So some implementers may be used to this, and
>> apply it to http, too.
>>
>> Also, while every natural language text has to assume that the reader
>> uses a certain amount of rational thinking, specs are usually written
>> with a somewhat reduced expectation in that respect, not because the
>> average reader is particularly dumb, but because the consequences of
>> interpreting something wrong are different than the consequences of
>> getting something wrong when e.g. reading a novel.
>>
>> So I don't see any reason for not keeping that sentence. Even if it
>> doesn't help, it definitely doesn't hurt.
>
> So what exactly does it mean in *practice* to treat something as
> "arbitrary data". What do you expect a browser to do in that case?

Let's say ask the user. That's what they are doing currently, as far as 
I'm aware of. I haven't checked every latest version of every browser, 
but on average, I'd expect a dialog that asks whether (and then where) I 
want to save the file, or with what application I want to open it.

But of course HTTP cannot say that, because HTTP is about more than 
browsers. But then, HTTP doesn't say what to do with data that is marked 
as application/octet-stream, the same way as it doesn't say what to do 
with data that is marked as text/html or any other media type. And that 
seems just fine.

Put another way, the sentence is not useless because clients already 
have to figure out what to do with data marked as application/octet 
stream. We just tell them to reuse and leverage what they have figured 
out and apply it to unlabeled content. If a client implementer, e.g. for 
a debugging tool, has figured out that they want to show 
application/octet-stream as plain text assuming a 'charset' that shows 
each byte separately, then it's fine for them to use that for unlabeled 
data.

That also means that the requirement is testable. Just check whether the 
same happens for data labeled as application/octet-stream and for 
unlabeled data. It may be difficult to automate such a test, in 
particular in a test suite that is supposed to work across clients, but 
it's nevertheless testable.

Also, the sentence is not useless because it tells implementers to NOT 
treat as any of the other available content types, and that's what's 
important.

Regards,   Martin.

Received on Thursday, 31 October 2013 04:33:49 UTC