#79 "results" property contains HTTP header values

None
closed-duplicate
Gene Wood
None
5
2015-05-31
2012-03-13
Anonymous
No

HTTP header values are included in "results" property, not only content body.

ex:
http://ipsj.ixsq.nii.ac.jp/ej/oai?verb=ListRecords&from=2007-03-01T00%3A00%3A00Z&metadataPrefix=junii2

Discussion

  • Gene Wood
    Gene Wood
    2015-05-31

    • status: open --> closed-works-for-me
    • assigned_to: Gene Wood
    • Group: -->
     
  • Gene Wood
    Gene Wood
    2015-05-31

    I'm not able to reproduce this issue in Snoopy 1.2.5 or 2.0.0. When fetching that URL I get only the results in the results attribute.

    Here's my test code

    <?php
    include "Snoopy.class.php";
    $Snoopy = new Snoopy;
    $Snoopy->fetch("http://ipsj.ixsq.nii.ac.jp/ej/oai?verb=ListRecords&from=2007-03-01T00%3A00%3A00Z&metadataPrefix=junii2");
    print_r($Snoopy);
    ?>
    

    And here's the output (with most of the webpage itself removed to make it easier to read)

        Snoopy Object
        (
            [host] => ipsj.ixsq.nii.ac.jp
            [port] => 80
            [proxy_host] => 
            [proxy_port] => 
            [proxy_user] => 
            [proxy_pass] => 
            [agent] => Snoopy v1.2.5-dev
            [referer] => 
            [cookies] => Array
                (
                )
    
            [rawheaders] => Array
                (
                )
    
            [maxredirs] => 5
            [lastredirectaddr] => 
            [offsiteok] => 1
            [maxframes] => 0
            [expandlinks] => 1
            [passcookies] => 1
            [user] => 
            [pass] => 
            [accept] => image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
            [results] => <?xml version="1.0" encoding="UTF-8" ?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2015-06-01T05:34:29Z</responseDate><request  verb="ListRecords" from="2007-03-01T00:00:00Z" metadataPrefix="junii2">https://ipsj.ixsq.nii.ac.jp/ej/?action=repository_oaipmh</request><ListRecords><record><header><identifier>oai:ipsj.ixsq.nii.ac.jp:80:00000001</identifier><datestamp>2015-03-05T04:05:18Z</datestamp><setSpec>00003</setSpec></header><metadata><junii2 xsi:schemaLocation="http://irdb.nii.ac.jp/oai  http://irdb.nii.ac.jp/oai/junii2-3-1.xsd">
        <title>目次,編集子独白</title><alternative>Contents, Editor&#039;s monolog</alternative><language>jpn</language><subject>目次</subject><URI>http://id.nii.ac.jp/1001/00000001/</URI><NIItype>Departmental Bulletin Paper</NIItype><rights>Copyright (c) 2009 by the Information Processing Society of Japan</rights><contributor lang="ja" >放送大学</contributor><creator lang="ja" >川合, 慧</creator><NCID>AN00116625</NCID><jtitle>情報処理</jtitle><volume>50</volume><issue>3</issue><dateofissued>2009-03-15</dateofissued><date>2009-06-29</date></junii2>
        .
        .
        .
        </metadata></record><record><header><identifier>oai:ipsj.ixsq.nii.ac.jp:80:00003111</identifier><datestamp>2015-03-05T04:05:18Z</datestamp><setSpec>00140</setSpec></header><metadata><junii2 xsi:schemaLocation="http://irdb.nii.ac.jp/oai  http://irdb.nii.ac.jp/oai/junii2-3-1.xsd">
        <title>ソフトウェア新時代:第6回 2000年問題がもたらすソフトウェア保守技術の進展</title><alternative>Evolution of Software Maintenance Technology Caused by the Year 2000 Problem</alternative><language>jpn</language><subject>連載</subject><URI>http://id.nii.ac.jp/1001/00003111/</URI><NIItype>Departmental Bulletin Paper</NIItype><rights>Copyright (c) 1998 by the Information Processing Society of Japan</rights><contributor lang="ja" >富士通研究所 マルチメディアシステム研究所</contributor><creator lang="ja" >上原, 三八</creator><NCID>AN00116625</NCID><jtitle>情報処理</jtitle><volume>39</volume><issue>9</issue><dateofissued>1998-09-15</dateofissued><date>2009-06-29</date></junii2>
        </metadata></record><resumptionToken expirationDate="2015-06-01T21:34:29Z">2007-03-01T00:00:00Z/9999-12-31T23:59:59Z//junii2/100</resumptionToken></ListRecords></OAI-PMH>
            [error] => 
            [response_code] => HTTP/1.1 200 OK
    
            [headers] => Array
                (
                    [0] => HTTP/1.1 200 OK
    
                    [1] => Date: Sun, 31 May 2015 20:34:29 GMT
    
                    [2] => Server: Apache/2.2.15 (CentOS)
    
                    [3] => Set-Cookie: nc_session=8f599a2jdnsr1he05b5anj8ft3; path=/ej
    
                    [4] => Expires: Thu, 19 Nov 1981 08:52:00 GMT
    
                    [5] => Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    
                    [6] => Pragma: no-cache
    
                    [7] => Set-Cookie: nc_password=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/ej
    
                    [8] => Connection: close
    
                    [9] => Content-Type: text/xml; charset=utf-8
    
                )
    
            [maxlength] => 500000
            [read_timeout] => 0
            [timed_out] => 
            [status] => 200
            [temp_dir] => /tmp
            [curl_path] => /usr/local/bin/curl
            [_maxlinelen] => 4096
            [_httpmethod] => GET
            [_httpversion] => HTTP/1.0
            [_submit_method] => POST
            [_submit_type] => application/x-www-form-urlencoded
            [_mime_boundary] => 
            [_redirectaddr] => 
            [_redirectdepth] => 0
            [_frameurls] => Array
                (
                )
    
            [_framedepth] => 0
            [_isproxy] => 
            [_fp_timeout] => 30
        )
    
     
  • Gene Wood
    Gene Wood
    2015-05-31

    I'm mistaken. The problem you're reporting is intermittent. The conditions required for this to occur are that the first connection attempt to fetch the headers times out but the second connection attempt to fetch the body succeeds.

    This was originally reported in Ticket [#56]. I'll close this as a duplicate and track the issue in [#56]

     

    Related

    Bugs: #56

  • Gene Wood
    Gene Wood
    2015-05-31

    • status: closed-works-for-me --> closed-duplicate