So I queried my media database SELECT id, size, LENGTH(data), ASCII(SUBSTRING(data, LENGTH(data))) from media ORDER by id
to compare the inserted length (determined at upload using the @ASSIGN below) with the actual length and they all matched. So the length of the File POSTARG is correctly calculated by witango. But I still don't know why the downloaded PDF is one byte shorter than the originally uploaded PDF. Perhaps there was a bug in the user-agent (Mac Mozilla 1.4) I used to upload the file originally or in how witango pulled out the POSTARG "File" prior to version 062. Inspecting the last character of my data shows the problematic PDF files have an extra ASCII-13 (carriage return). Anyway, at least the problem is fixed for future uploads, and I know how to fix the problematic PDF files >Was there a bug in this tag that got fixed in 062? > >Background: > >I've been chasing down a bug with downloading pdf files from the db. IE >6 now is very persnickety about the content-type and content-length >headers, and will refuse to launch acrobat reader if they aren't right. > >See http://support.microsoft.com/default.aspx?kbid=305153 > >Anyway, I couldn't see anything wrong with my headers, so I finally >downloaded a pdf from the db back into my web directory and then compared >the headers sent by apache with what I was constructing. (The apache >download opens correctly.) I found that Content-Length differed by one >byte! > >So I then looked at my upload function to see what was going on, and it >looked fine. I then re-uploaded the pdf from the web directory into the >db. This time it had the correct length. I've been using the same code >for a long time to get the file length: > ><@ASSIGN NAME="size" SCOPE="request" VALUE=<@LENGTH STR=<@ARG File>>> > >So anyone know if something changed on the server? > >BTW, I would REALLY like to see errata with every release. At >Corroboree, Phil reported that they've worked through all our bugs, and >need us to report some more. So I checked one of my old bugs, and found >it was indeed fixed, but I just never knew about it. I think it would be >great if registered users could get a status report on bugs, what >version fixed them, etc. > >Bill Conlon > >To the Point >345 California Avenue Suite 2 >Palo Alto, CA 94306 > >office: 650.327.2175 >fax: 650.329.8335 >mobile: 650.906.9929 >e-mail: mailto:[EMAIL PROTECTED] >web: http://www.tothept.com > > >________________________________________________________________________ >TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf > Bill Conlon To the Point 345 California Avenue Suite 2 Palo Alto, CA 94306 office: 650.327.2175 fax: 650.329.8335 mobile: 650.906.9929 e-mail: mailto:[EMAIL PROTECTED] web: http://www.tothept.com ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf
