API listIntervals request crashes - FogBugz Knowledge Exchange most recent 30 from http://fogbugz.stackexchange.com2013-05-26T02:12:30Zhttp://fogbugz.stackexchange.com/feeds/question/9865http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://fogbugz.stackexchange.com/questions/9865/api-listintervals-request-crashesAPI listIntervals request crashesquassnoi2012-01-25T20:12:26Z2013-05-25T21:22:00Z
<p>Not sure if it's a correct place for bug requests, still.</p>
<p>I'm requesting my work intervals from an online <code>fogbugz.com</code> installation.</p>
<p>Here's the code I use to do it:</p>
<pre><code>#!/bin/sh
FB_KEY=`cat ~/etc/myproject.fogbugz.com.token`
(
echo -ne "cmd=listIntervals&"
echo -ne "token=$FB_KEY"
) | POST -Ue https://myproject.fogbugz.com/api
</code></pre>
<p>I get back truncated <code>XML</code> and these headers:</p>
<pre><code>200 OK
Cache-Control: private
Connection: close
Date: Wed, 25 Jan 2012 19:48:36 GMT
ETag:
Server: Microsoft-IIS/6.0
Content-Type: text/xml;charset=utf-8
Expires: Tue, 05 Sep 2000 09:00:00 GMT
Client-Aborted: die
Client-Date: Wed, 25 Jan 2012 19:48:36 GMT
Client-Peer: 64.34.80.163:443
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance CA-3
Client-SSL-Cert-Subject: /C=US/ST=New York/L=New York/O=Fog Creek Software, Inc./OU=IT/CN=*.fogbugz.com
Client-SSL-Cipher: DHE-RSA-AES256-SHA
Client-SSL-Socket-Class: IO::Socket::SSL
Client-Transfer-Encoding: chunked
Set-Cookie: sUniqueID=20120125194836-MY_IP_HERE-mblsf1u0p4; expires=Wed, 26-Jan-2022 00:48:36 GMT; path=/; secure; HttpOnly
X-AspNet-Version: 2.0.50727
X-Died: Missing newline after chunk data: <...XML Skipped...> at /usr/share/perl5/vendor_perl/Net/HTTP/Methods.pm line 481, <STDIN> line 1.
X-Powered-By: ASP.NET
</code></pre>
<p>XML is truncated at arbitrary places and sometimes it returns in full. The text in <code>X-Died</code> is the XML continued after the response was truncated.</p>
<p>My login is my username at <code>gmail.com</code></p>
http://fogbugz.stackexchange.com/questions/9865/api-listintervals-request-crashes/10503#10503Answer by Tim Retout for API listIntervals request crashesTim Retout2012-06-11T14:28:27Z2012-06-11T14:54:10Z<p>After some investigation, this appears to be a bug in Net::HTTP rather than FogBugz:</p>
<p><a href="https://rt.cpan.org/Public/Bug/Display.html?id=74431" rel="nofollow">https://rt.cpan.org/Public/Bug/Display.html?id=74431</a></p>
<p>or possibly:</p>
<p><a href="https://rt.cpan.org/Public/Bug/Display.html?id=72790" rel="nofollow">https://rt.cpan.org/Public/Bug/Display.html?id=72790</a>
https://bugzilla.redhat.com/show_bug.cgi?id=768394</p>
<p>The giveaway is the X-Died error message mentioning Perl - AFAIK Fog Creek don't use Perl for anything. :)</p>
http://fogbugz.stackexchange.com/questions/9865/api-listintervals-request-crashes/11033#11033Answer by Steve Simms for API listIntervals request crashesSteve Simms2012-12-22T00:20:26Z2012-12-22T00:20:26Z<p>I ran into the same problem, and was able to fix it by upgrading Net::HTTP to the latest version -- it appears to have been fixed in version 6.04:</p>
<p><a href="http://cpansearch.perl.org/src/GAAS/Net-HTTP-6.04/Changes" rel="nofollow">http://cpansearch.perl.org/src/GAAS/Net-HTTP-6.04/Changes</a></p>