Quote:
Originally Posted by ashkulz
I've already figured out #2 and #3: look at the "Content-disposition" header, and if it provides a filename call mimetypes.guess_type on the file which will give the correct MIME type. I'm more hesitant of doing it for URLs where they don't specify Content-disposition and the URL ends with .imp and the content-type is not correct: it may be a valid URL. You can choose to override it in the plugins system I plan to develop.
|
I think Example #3, in my privoxy log file above, would be the most common, as it will come about when surfing the IMP ebook upload forum threads and selecting the .imp attachment therein (doesn't end with .imp).
Example #2 is what would be expected if the "IMP Download Guide" could be prepared by Alexander in .imp format and/or .html format similar to the current 'Mobipocket Download Guide'. Again doesn't end with .imp.
Example #1 (the one you haven't nailed down yet) can rarely be found, so rare that I had trouble finding a single example to surf to, until I edited a message here and surfed to that link. So do we need to handle this situation? Maybe not!
Ashish, could you check the booklist creation code. Whenever there are more than 100 books IN TOTAL being sent (i.e. 101+ ), the booklist doesn't get processed. For 100 or below books it is fine!
My logs between the REB1200 and GEBLibrarian showed that the booklist should be sent in chunks of 100 books (each with its respective booklist length) at a time and then the INDEX=1 URL encoded tag will properly be bumped up to INDEX=101 for the next batch of 100 books and so on. Right now the INDEX gets bumped up by a very large amount and hence causes that aborted booklist attempt. This is an excerpt of my GEBLibrarain log that I was referring to:
Code:
GET http://bookshelf.ebooksystem.net/bookshelf/default.asp?INDEX=1&REQUEST=100&SHOW_HIDDEN=YES HTTP/1.0
User-Agent: Allegro HTTP Client
Host: bookshelf.ebooksystem.net
Accept-Encoding: deflate, x-des-encrypted
...
GET http://bookshelf.ebooksystem.net/bookshelf/default.asp?INDEX=101&REQUEST=100&SHOW_HIDDEN=YES HTTP/1.0
User-Agent: Allegro HTTP Client
Host: bookshelf.ebooksystem.net
Accept: text/x-booklist
Accept-Encoding: deflate, x-des-encrypted