Browse Category: Uncategorized

Python on OSX proxy bug with curl

I received a lovely stack trace trying to run a python script that makes an external call using curl. The meat of it:

File “/Library/Python/2.6/site-packages/pyechonest/”, line 52, in call
f = urllib.urlopen(url)
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/”, line 87, in urlopen
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/”, line 203, in open
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/”, line 310, in open_http
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/”, line 1555, in proxy_bypass
File “/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/”, line 1425, in proxy_bypass_macosx_sysconf

This is a bug due to how python on OSX parses the values in the proxy bypass box in the system’s Proxy configuration. If you have an explicit IP, it will bomb out. Remove the explicitly specified IP or change it to a name value to get around this bug. Netblocks (such as “10/8”) won’t cause it to bomb — just a definite IP like

Oh, perl…

Installing EV from CPAN, I received this message:

Checking if your kit is complete…
Looks good
Warning: prerequisite common::sense 0 not found.


Notes on iPad’s movie player

The iPad’s built-in movie player identifies itself as the useragent “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)” and explicitly specifies a range to download, allowing for chunked streaming. Here are the headers from both sides of a recent transaction on my server:

GET /music/lt-fundies.mp4 HTTP/1.1
Range: bytes=110691320-147521535
Connection: close
User-Agent: AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)
Accept: */*
Accept-Encoding: identity

HTTP/1.1 206 Partial Content
Date: Sat, 24 Apr 2010 09:28:22 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Wed, 17 Sep 2008 18:35:48 GMT
ETag: \”4ad19f-998329f-4571bbcac8900\”
Accept-Ranges: bytes
Content-Length: 36830216
Content-Range: bytes 110691320-147521535/160969375
Connection: close
Content-Type: text/plain; charset=UTF-8

Fun fact – a dropped packet results in awesome skipping on the client! …it also spams your access_logs with each request: – – [24/Apr/2010:09:33:59 +0000] “GET /music/lt-fundies.mp4 HTTP/1.1” 206 7012352 “-” “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)” – – [24/Apr/2010:09:34:00 +0000] “GET /music/lt-fundies.mp4 HTTP/1.1” 206 26657760 “-” “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)” – – [24/Apr/2010:09:34:02 +0000] “GET /music/lt-fundies.mp4 HTTP/1.1” 206 2558 “-” “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)” – – [24/Apr/2010:09:34:02 +0000] “GET /music/lt-fundies.mp4 HTTP/1.1” 206 6912055 “-” “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)” – – [24/Apr/2010:09:34:03 +0000] “GET /music/lt-fundies.mp4 HTTP/1.1” 206 26500344 “-” “AppleCoreMedia/ (iPad; U; CPU OS 3_2 like Mac OS X)”

SNMP RAID monitoring with LSI SATA RAID controllers

tar xzvf lin_apps_a04.tar.gz
rpm -Uvh percsnmp-4.06-1.i386.rpm
cp /etc/percsnmp/release/perc.mib /usr/share/snmp/mibs

If your SNMP config works, try this:

snmpwalk -m +RAID-Adapter-MIB -v1 -c public localhost .