[DAS2] Re: New problem with content-type header in DAS/2 server responses!

Andrew Dalke dalke at dalkescientific.com
Wed Nov 9 17:37:21 UTC 2005


Steve:
> Here's the relevant thread for reference:
> http://portal.open-bio.org/pipermail/das2/2005-July/000227.html

Ahh, it's the one I half remembered, from July.

Allen said:
>  Not sure how much value there is in
> this, but here is a very simple graphical display of regions on the
> server, and their relative sizes.

I think it's useful to have web browserability, as it were, but I
think it's a secondary goal.  To me the ability to transform the
XML via the stylesheet is something that's technology driven and
not user driven.  That is, nothing in the previous work, including
the DAS/2 proposals from others, mentioned that as a need.

On the other hand, being able to get the content type of what's
coming back from the server is a design goal, and we have an
existing need -- Gregg's example -- for it.

I would rather therefore put the onus on the data provider to be
clever in sniffing out the client than in the DAS/2 client in
sniffing out the data.

Steve:
> In your other email on this thread, you said:
>
>> This, btw, suggests a third solution to the problem of letting DAS/2
>> and web browser clients both point to the same object - se
>>
>> Content-Type: text/xml; das-type=das2xml
>>
>> But that's ugly.
>
> This seems like a good solution (and not too ugly IMHO). The das-type 
> value
> could be more detailed (e.g., x-das-features+xml). However, I recall 
> that
> there were possible problems with this syntax, but can't remember the
> details at the moment.

We have discussed this on-and-off for a while now, eh?  Here's
the previous thread on it:

http://portal.open-bio.org/pipermail/das2/2004-December/000019.html

I need to do a bit more research.  I don't like the idea of making
new headers and I don't like the idea of using a modified content-type
like that.  The first because we aren't doing anything unusual
compared to other projects and the second because I don't have any
experience with that.

I suspect the answer will be:
   - by default if no "?format=" is specified then return "text/xml"
   - if the client sends an "Accept: text/x-das-features+xml" then
       return the document with the proper content-type information

In that way if someone pastes a "http://.../blah?format=xyz and they
get a bunch of garbage that can manually chop off the obvious "format="
part of the query.

But that doesn't agree with my use case, where the DAS/2 client
gets a random URL.  It would need to send "Accept: ..." where the "..."
is a list of all the possible DAS content-types.

I'll think about this some more while I'm out salsa dancing this
evening.  :)

					Andrew
					dalke at dalkescientific.com




More information about the DAS2 mailing list