Saturday, November 27, 2004

Sharpreader vs WordPress

I chose Sharpreader as an aggregator - but there are a number of blogs whose feeds verify but fail to load with a red

The underlying connection was closed: The server committed an HTTP protocol violation.

The problem — WordPress emits a maformed HTTP header "Last Modified:", which should be "Last-Modified:" and the default paranoid setting of .NET rejects this.

The workround — create a sharpreader.exe.config file alongside sharpreader.exe ; this is a plain text file containing:

<configuration>
  <system.net>
    <settings>
      <httpWebRequest useUnsafeHeaderParsing="true" />
    </settings>
  </system.net>
</configuration>

The fix — To fix this problem in Wordpress, search for the following line in your PHP and add the hyphen

@header('Last-Modified: '.$wp_last_modified);.

No comments :