fôxglove (fg) wrote in lj_dev,
fôxglove
fg
lj_dev

HTTP/xmlrpc

Hi all,

I'm seeing strange things happen when I call GetEvents through xmlrpc.

Sometimes the connection simply closes with no response

Other times, I get what seems like otherwise proper XML, but with strange strings inserted like this:

HTTP/1.0 200 OK
Date: Mon, 20 Dec 2004 00:12:54 GMT
Server: Apache
Set-Cookie: ljuniq=5HTnztLtYkRSwZ1:1103501574; expires=Friday, 18-Feb-2005 00:12:54 GMT; domain=.livejournal.com; path=/
Content-Length: 228115
Content-Type: text/xml
SOAPServer: SOAP::Lite/Perl/0.55
Keep-Alive: timeout=30, max=100
Connection: keep-alive

image/png
<?xml version="1.0" encoding="UTF-8"?><methodResponse><params>...
what is that 'image/png' doing there? I put the request that generated the above reply here in the cut:

POST /interface/xmlrpc HTTP/1.0
Content-Type: text/xml
User-Agent: ljArchive; ljArchive@fawx.com
Content-Length: 3050
Connection: Keep-Alive
Host: localhost:8080

<?xml version="1.0" encoding="utf-8"?>
<methodCall>
  <methodName>LJ.XMLRPC.getevents</methodName>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>username</name>
            <value>
              <string>fg</string>
            </value>
          </member>
          <member>
            <name>auth_method</name>
            <value>
              <string>challenge</string>
            </value>
          </member>
          <member>
            <name>auth_challenge</name>
            <value>
              <string>c0:1103500800:773:60:yyNouJDLhVCjZ4z2KE8E:fa222e7508ece367fe68333942ed2574</string>
            </value>
          </member>
          <member>
            <name>auth_response</name>
            <value>
              <string>178a90205748b435df9d80cf40c757d1</string>
            </value>
          </member>
          <member>
            <name>ver</name>
            <value>
              <i4>1</i4>
            </value>
          </member>
          <member>
            <name>truncate</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>prefersubject</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>noprops</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>selecttype</name>
            <value>
              <string>syncitems</string>
            </value>
          </member>
          <member>
            <name>lastsync</name>
            <value>
              <string>2002-10-29 10:13:22</string>
            </value>
          </member>
          <member>
            <name>year</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>month</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>day</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>howmany</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>beforedate</name>
            <value>
              <string />
            </value>
          </member>
          <member>
            <name>itemid</name>
            <value>
              <i4>0</i4>
            </value>
          </member>
          <member>
            <name>lineendings</name>
            <value>
              <string>unix</string>
            </value>
          </member>
          <member>
            <name>usejournal</name>
            <value>
              <string />
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>


Any suggestions? Is there something suspect with my request or the request's http header?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 9 comments