Re: [PSR-12] blank line after

2017-12-09 Thread Adrien Crivelli
I agree that it has to be standardized and not left open to interpretation. 
And since all other header blocks are treated the same way, it make sense 
to also treat `https://github.com/php-fig/fig-standards/pull/984

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/9f3de34a-231d-4b80-ac9b-d581bffa723c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: The progress of HTTP client

2017-12-09 Thread Niklas Keller

>
> *Client:*
> You are just referring to an example that show that if you modify the body 
> you must to the same modifications on the headers. 
>

Yes, I guess that's rather a specific question, as it should be clear to 
other modifications. Should the `transfer-encoding: chunked` header be 
removed by a client or not?
 

> *Exceptions:*
> By "smaller issues" we mean: Things that do not stop you form sending a 
> request. If you are using the wrong HTTP version in the status line, that 
> does not stop the client from sending the request. The server may be able 
> to handle that anyways. So the client should not be "smart" and help you to 
> fail early. 
>

A wrong HTTP version isn't a small issue to me. Different HTTP versions 
have a different message syntax and it's not wise just sending a wrong HTTP 
version the client doesn't understand. The list of possible HTTP versions 
is quite small, I think explicitly checking the version makes sense in 
every client. In the worst case, sending another HTTP version the client 
doesn't understand might result in a security vulnerability, because the 
client interprets things the wrong way.
 

> We do mention 1xx responses. They should be handled by the client.
>

Yes, they're mentioned in the interface docs, but not in the specification 
itself.
 

> *RequestException*: 
> Hm, I do not think so. Why would you ever be interested in a Request that 
> was not sent? Im way more interested in the request that failed, right?
>

I don't have an immediate use case, but I can imagine that it could be 
useful if you want to find the failed request within a set of requests. 
Having the original request available would allow using ===, which 
explicitly isn't possible with the current interface.

On the other hand, the request will usually be available at the place the 
exception is caught I guess.

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/d5e2dcae-3978-4c1c-816c-4e0e50a0dd93%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: The progress of HTTP client

2017-12-09 Thread Tobias Nyholm
Thank you. 

*Client:*
You are just referring to an example that show that if you modify the body 
you must to the same modifications on the headers. 

*Exceptions:*
By "smaller issues" we mean: Things that do not stop you form sending a 
request. If you are using the wrong HTTP version in the status line, that 
does not stop the client from sending the request. The server may be able 
to handle that anyways. So the client should not be "smart" and help you to 
fail early. 

We do mention 1xx responses. They should be handled by the client. 

*RequestException*: 
Hm, I do not think so. Why would you ever be interested in a Request that 
was not sent? Im way more interested in the request that failed, right?

//Tobias


Den fredag 8 december 2017 kl. 13:19:48 UTC+1 skrev Niklas Keller:
>
> I have just reviewed the current document, you can find my feedback below.
>
> *Client: *It specifies that a client that decodes a gzipped body must 
> remove the corresponding header. Does it also have to remove a chunked 
> encoding header? It's a requirement of the HTTP specification that a client 
> decodes chunked encoding.
>
> *Exceptions:* Smaller issues, like wrong HTTP versions, must not result 
> in an exception being thrown. This seems problematic to me. First of all, 
> there's no definition of "smaller issues". Next, I'd not classify a wrong 
> HTTP version as smaller issue. The semantics might change with newer HTTP 
> versions and a client that doesn't understand these shouldn't just send a 
> request with a newer HTTP version.
>
> Another point is the missing mention of 1XX responses here, as they can be 
> parsed into a valid HTTP response, but they're actually intermediate 
> responses.
>
> *RequestException + **NetworkException**: *getRequest() is documented to 
> return a request that might be different from the original request. Does it 
> make sense to add another method that returns the original request?
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/aa6fcf59-9322-4d0d-bb72-22c3841468e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.