« first day (3827 days earlier)      last day (1121 days later) » 
00:00 - 20:0020:00 - 00:00

8:03 PM
@Dharman It's a reasonable move.
Which bug?
 
Where are the contents of opcode TMPVAR/VAR stored nowadays? I remember them being just being the oparrays themselves, but I can't find an example to access them.
 
@Derick You mean at runtime?
 
yeah
 
EX_VAR / ZEND_CALL_VAR?
 
8:07 PM
@Dharman Hey, I'm in that bug report!
 
EX_VAR_NUM is I think what I need, right?
it's for the return of a DO_FCALL
 
cmb
@IMSoP wow, very good find!
 
@Derick EX_VAR if you're just using opline->result.var
 
ok, how's the num variant different?
 
EX_VAR_NUM if you have it as the variable number rather than a precomputed offset
 
8:09 PM
ok. I have "curopcode->result.var"
(with curopcode being exeute_data->opline)
ah, I see - I used EX_VAR_TO_NUM to get the number :-)
ok. thanks!
tv time now, but I'll get back to this tomorrow
 
cmb
@Trowski does amphp/http-client heed the content-lenght, or how does it detect the end of the stream?
 
@LeviMorrison Yeah, but the linked reported is not a solution. I tried to reproduce the error but I was not able to. Maybe my setup is different
 
@cmb Content-length or chunked transfer encoding.
 
cmb
ah, yes; PHP streams don't do that, and I've no idea how to implement that
PHP stream just poll the server (select(2)), and if it doesn't close the connection, it hangs till timeout
 
Is there not an opportunity to add the number of bytes received to a counter?
On the surface it sounds like a trivial thing to implement, but I haven't looked at the code at all.
 
cmb
8:16 PM
the number of bytes received is already tracked, but the content-length is not stored in the stream; without modifying the public struct, we'd need to add a global
frankly, I don't think it's worth to treat this as bug, given that the server behaves as expected when Connection:Close (upper-case Close) is sent
 
The server is misbehaving, but it's best to handle that if possible. Maybe it can't be until 8.1 if the struct has to be modified.
You can handle the case where chunked encoding is used.
Too bad you can't force the server to respond with chunked.
 
cmb
@Trowski yes, by looking for \r\n0\r\n, I think
 
Yes, exactly.
 
cmb
and I agree that there is room for improvement :)
 
Do what you can for 8.0, actually fix for 8.1 I guess.
 
8:26 PM
interestingly, ext/soap has its own implementation of HTTP, which I think does close the connection explicitly: heap.space/xref/php-src/ext/soap/php_http.c?r=84e12626#1083
 
@cmb It's possible to add new members to allocated structs
Though adding an HTTP specific field to the main php_stream would be pretty odd
Although, isn't this what stream->abstract is for?
Hm no, I think abstract is already used by the transport layer
 
cmb
I think I'll have a fresh look at it tomorrow.
 
8:47 PM
I'm obviously way out of my depth at this point, but digging through, I see that the chunked transfer encoding is implemented as a stream filter on top of the HTTP stream wrapper
if the filter could indicate "this stream should be closed now", you could have a "pipelined_http" filter that closed the connection after reading content-length bytes
and the chunked filter could detect the end marker and do likewise
 
\0
 
would presumably need an extra status in php_stream_filter_status_t
 
That seems like a reasonable solution.
 
9:08 PM
@NikiC what would the change you're proposing on Dmitry's PR about the type map pointer thing?
I suppose "simple" unions which only have one class would still use the void* for the CE?
 
@Girgias types can currently store either the class name, or the resolved class entry pointer
 
Ah yeah, makes for a lot of if/else things
So I imagine you'd want to only store the resolved class entry pointer?
 
@Girgias Store only the class name with class entry cache slot
i.e. only use the representation you'd get with opcache
 
Ohhhhhh
 
where we can't modify types in-place
 
9:16 PM
Anyway I need to rebase and refactor my PR now
 
9:31 PM
@IMSoP there's no need for the server to "acknowledge" connection: close from the request. Changing the case might fix this case, but might break other broken implementations.
 
with a php docblock, is it possible to say if a method can return a string or empty string?
something like @return string|'' or something... I dunno
null is prevented from returning via null coalesce
hmm, googling doesn't appear to have anything relevant for phpdocumentor, I'll comment it
 
@Tiffany uhm, string includes empty string?
 
it does, but I want to specify that it may be empty
return $this->oXPath->query($sQuery)->item(0)->textContent ?? '';
 
@kelunik I know, and I know; the fact that it doesn't acknowledge it was a sign that it hadn't detected it; the patch is not a proposed fix, it's just confirming what's happening
 
@bwoebi I'm anticipating future debugging of "why is this empty?!"
 
9:44 PM
@Tiffany Why not null?
 
@Tiffany sounds like an use case for a text description of the retval, like @return string empty if not found
 
@kelunik With lower case "connection: close", that server responds identically to if you send "connection: keep-alive", or no connection header at all; with upper case "Close", the PHP implementation no longer hangs. That confirms two things: 1) the server is definitely buggy, because "close" should be case insensitive; 2) the problem in PHP is only with "keep-alive" connections, which we already knew, that's why we sent "Connection: close"
it's still reasonable for PHP, as a good internet citizen, to handle it more gracefully; it just turns out to be tricky, because the TCP level stream doesn't know about the HTTP level content-length
for once, the abstraction is not leaky enough
 
@PeeHaa cause I don't know what code to write to deal with the nulls further up the stack call. it's an XML parser.
 
oshit the new phpstorm splash is funky
 
return 'OMG! The XML is b0rked!';
 
9:58 PM
it's kinda cool
 
also welcome back @PeeHaa :) o/
 
@IMSoP 😂
that would be accurate...
Customer: "what does this mean? 'OMG! The XML is b0rked!'?"
"ummmm...."
 
it's, um, a technical term...
(I must bed; ttfn)
 
 
1 hour later…
11:17 PM
pow and ** different result ・ *General Issues ・ #80943
 
11:54 PM
gzencode() sets a strange OS byte on Windows ・ Zlib related ・ #80944
 
00:00 - 20:0020:00 - 00:00

« first day (3827 days earlier)      last day (1121 days later) »