They are really important; we need to provide access to them.
On 5/20/08, Kevin Brown <et...@google.com> wrote:
> What are the actual use cases for this? You can already return a structured
> response (JSON or XML). The response headers may or may not be altered by
> any number of intermediate proxies and caches, and most of the header data
> is meaningless cruft that would slow the http response.
>
> On Tue, May 20, 2008 at 4:08 AM, humbroll <humb...@gmail.com> wrote:
>
>>
>> There are five HTTP methods in gadget(core) specification(http://
>> code.google.com/apis/opensocial/docs/0.7/reference/
>> gadgets.io.MethodType.html): delete, get, head, post and put.
>> How can I read response ? there is no comment about it.
>> So, I want to propose to add 'headers' parameter to response
>> structure(http://code.google.com/apis/opensocial/articles/
>> makerequest.html#programming-response<http://code.google.com/apis/opensocial/articles/makerequest.html#programming-response>)
Headers are needed in many situations, including auth
(www-authenticate), atompub resource creation (location:), content
negotiation (did I get plain text or HTML? Don't guess!)
They are really important; we need to provide access to them.
On Tue, May 20, 2008 at 10:57 PM, John Panzer <jpa...@google.com> wrote:
Headers are needed in many situations, including auth
(www-authenticate), atompub resource creation (location:), content
negotiation (did I get plain text or HTML? Don't guess!)
They are really important; we need to provide access to them.
In "normal" HTTP this is true, but it's very difficult to make guarantees of the header validity through makeRequest. Requiring proper headers being returned severely limits the flexibility of containers to optimize these calls by caching.
There are also many headers that simply wouldn't be accurate, such as Content-Type (the proxy will usually change the encoding for text-based protocols), Content-Length, Connection, Date, Last-Modified, etc.
On Tue, May 20, 2008 at 10:57 PM, John Panzer <jpa...@google.com> wrote:
Headers are needed in many situations, including auth
(www-authenticate), atompub resource creation (location:), content
negotiation (did I get plain text or HTML? Don't guess!)
They are really important; we need to provide access to them.
In "normal" HTTP this is true, but it's very difficult to make guarantees of the header validity through makeRequest. Requiring proper headers being returned severely limits the flexibility of containers to optimize these calls by caching.
On Wed, May 21, 2008 at 11:18 AM, Kevin Brown <et...@google.com> wrote:On Tue, May 20, 2008 at 10:57 PM, John Panzer <jpa...@google.com> wrote:
Headers are needed in many situations, including auth
(www-authenticate), atompub resource creation (location:), content
negotiation (did I get plain text or HTML? Don't guess!)
They are really important; we need to provide access to them.
In "normal" HTTP this is true, but it's very difficult to make guarantees of the header validity through makeRequest. Requiring proper headers being returned severely limits the flexibility of containers to optimize these calls by caching.
There are also many headers that simply wouldn't be accurate, such as Content-Type (the proxy will usually change the encoding for text-based protocols), Content-Length, Connection, Date, Last-Modified, etc.
I may be misunderstanding the issues, but I'm not understanding how the proxy can not get these correct.
If the proxy changes the encoding, it BETTER set the correct Content-Type header. How are you supposed to know what encoding you're getting otherwise? (And if it always changes to the same encoding no matter what, then providing the right Content-Type is clearly trivial, right?)
Content-Length -- kind of important, especially for keep-alive connections going through the browser. Doesn't the proxy kind of have to get this right if it ever hopes to avoid re-creating TCP connections for each HTTP request?
Last-Modified is easy: Don't touch it.