Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#11565 closed defect (bug) (worksforme)

rev 12425 stream_set_timeout()

Reported by: solariz's profile solariz Owned by: ryan's profile ryan
Milestone: Priority: high
Severity: normal Version: 2.9
Component: HTTP API Keywords:
Focuses: Cc:


In the rev change 12425 / 12424 some handling for float timeouts was submitted. Some ppl. reporting for pingbacks not coming through on some systems. I noticed a discussion at the comments about the stream_set_timeout function:

If you are using fsockopen() to create a connection, first going to write into the stream and then waiting for the reply (e.g. simulating HTTP request with some extra headers), then stream_set_timeout() must be set only after the write - if it is before write, it has no effect on the read timeout.

Maybe for a safety reason a null packet should be sent and stream_set_timeout added to avoid this as a problem source.

Change History (5)

#1 @miqrogroove
14 years ago

  • Component changed from Pings/Trackbacks to HTTP
  • Keywords timout pingback ceil floor removed
  • Milestone changed from Unassigned to 2.9.1
  • Priority changed from normal to high

Sending to 2.9.1 with high priority.

#2 @miqrogroove
14 years ago

  • Summary changed from http.php rev 12425 Timeouts to rev 12425 stream_set_timeout()

#3 @miqrogroove
14 years ago

On further reading, that particular comment was 3 years old and looks similar to

There might have been a legacy conflict between fsockopen and the openssl library.

On the other hand, it would be a good idea to properly test the sockets transport before 2.9.1 goes out.

#4 @hakre
14 years ago

Related: #11468, [12424] for trunk, [12425] for 2.9

#5 @dd32
14 years ago

  • Milestone 3.0 deleted
  • Resolution set to worksforme
  • Status changed from new to closed

I believe this may've changed in later versions of PHP. From what i've read, stream_set_timeout() should generally be safe to be used in the way suggested here.

I'm not sure how PHP would handle sending a null packet either, or how that'd fit in with some web servers. I'm closing this as invalid, unless someone can point out a real-world bug caused by this, or can produce some odd results in testing.

Note: See TracTickets for help on using tickets.