Package: libcppnetlib0

I cannot parse the following mime file. Steps:

$ mkdir /tmp/d
$ cd /tmp/d
$ apt-get source cpp-netlib
$ cd cpp-netlib-0.10.1
$ g++ -o demo ./libs/mime/example/basic_parsing.cpp
$ ./demo.sh
$ ./libs/mime/test/mimeParse.py ./demo.mime
**********************************
Data from: ./demo.mime
Content-Type: multipart/related
There are 1 headers
There are 1 sub parts
  Content-Type: application/pdf
  There are 1 headers
  The body is 512 bytes long
   0 0 0 0 0 ...  0 0 0 0 0

while:

$ ./demo ./demo.mime
**********************************
terminate called after throwing an instance of 'std::runtime_error'
  what():  Couldn't find Content-Type phrase (boundary)
[1]    1328 abort      ./demo ./demo.mime

Where:

$ cat demo.sh
#!/bin/sh
out=demo.mime

boundary="demo.bug.cpp-netlib"
content_type="Content-Type: multipart/related; type=application/pdf;
boundary=${boundary}"

echo -n "${content_type}\r\n\r\n" > $out
echo -n "--$boundary\r\n" >> $out
echo -n "Content-Type: application/pdf\r\n" >> $out
echo -n "\r\n" >> $out
head -c 1b /dev/zero >> $out
echo -n "\r\n" >> $out
echo -n "--$boundary--" >> $out


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to