#7445 (sfTesterResponse::isValid() is loading DTDs opening external HTTP connections)

You must first sign up to be able to contribute.

Ticket #7445 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

sfTesterResponse::isValid() is loading DTDs opening external HTTP connections

Reported by: nicolas Assigned to: Kris.Wallsmith
Priority: minor Milestone: 1.3.0 beta2
Component: tests Version: 1.3.0 alpha2
Keywords: html, markup, validation, tests, dtd, xml, w3c Cc: fabien
Qualification: Design decision

Description (Last modified by nicolas)

I run a project test suite where I check if the html markup against its declared DTD:


Currently I have:

 RuntimeException: PHP sent a "warning" error at /blablablah/lib/vendor/symfony/lib/test/sfTesterResponse.class.php line 181 (DOMDocument::loadXML( failed to open stream: HTTP request failed! HTTP/1.1 503 Service Unavailable

Okay, it can be a temporary problem, but anyway, I think:

  • it's hardly acceptable because a lot of integration servers are not accepting outgoing HTTP connections, so it will fail everytime the test is ran,
  • so it's not a valid test result failure reason

What I suggest is to bundle W3C DTD documents within symfony and load them to validate markup using a call to the filesystem.


dtd.diff (330.1 kB) - added by Kris.Wallsmith on 10/27/09 14:36:49.
Is this the sort of thing you're thinking?

Change History

10/27/09 08:04:10 changed by nicolas

  • description changed.

10/27/09 09:14:14 changed by DennisBenkert

W3C decided to block requests not coming from browsers.

+1 for nicolas' idea to use bundeled DTD files. Also it's nicer for the W3C servers because the traffic amount would get higher and higher as more people use isValid(true)

10/27/09 10:24:21 changed by rande

+1 !!

10/27/09 14:36:49 changed by Kris.Wallsmith

  • attachment dtd.diff added.

Is this the sort of thing you're thinking?

10/27/09 14:42:39 changed by Kris.Wallsmith

  • status changed from new to closed.
  • resolution set to fixed.

(In [23380]) [1.3] bundled DTDs to avoid issuing requests to (closes #7445)

10/27/09 14:53:08 changed by DennisBenkert

Works like a charm for me now

10/27/09 15:24:55 changed by nicolas

same here, kudos Kris

11/10/09 21:08:10 changed by Kris.Wallsmith

  • milestone changed from 1.3.0 to 1.3.0 beta2.