Version: (using KDE Devel) Installed from: Compiled sources OS: Linux I've just attached 2 png images to a bug and they won't show. Here are the urls: http://bugs.kde.org/attachment.cgi?id=6498&action=view http://bugs.kde.org/attachment.cgi?id=6499&action=view The bug they were attached to is bug #84178 These 2 png files are _not_ corrupt - they show fine on my local filesystem in Konqueror.
Have you tried to download them again and see if there are still the same? (Mozilla complain that they are corrupt.) Have a nice day!
pngcheck complains that the file were corrupted: "... file CORRUPTED by text compression." (file complains too.) So please check how you have uploaded the files, if you do not feel having done anything wrong try to upload the file again with Mozilla (or any other browser) to know if the problem is KDE Bugs or Konqueror. Have a nice day!
Created attachment 6517 [details] Test PNG image
So I was able to upload and download the file ( attachment #6517 [details] ) with Konqueror 3.1.4-SuSE 9.0 without corruption. (Mozilla 1.4 can download and display this file correctly.) Have a nice day!
Experencied the same (broken image upload) with KDE/HEAD recently.
The patch in http://bugs.kde.org/show_bug.cgi?id=83098#c6 suggests that it's an khtml bug.
CVS commit by coolo: reverting Waldo's commit (for #83098) for beta2. I've got another fix reviewed by Dirk and Waldo, but that will need some more testing CCMAIL: 84179-done@bugs.kde.org CCMAIL: 83098@bugs.kde.org M +3 -36 html_formimpl.cpp 1.377 --- kdelibs/khtml/html/html_formimpl.cpp #1.376:1.377 @@ -110,36 +110,4 @@ long HTMLFormElementImpl::length() const } -static QCString expandLF(const QCString& s) -{ - // LF -> CRLF - unsigned crs = s.contains( '\n' ); - if (crs == 0) - return s; - unsigned len = s.length(); - - QCString r(len + s.contains( '\n') *2 + 1); - unsigned pos2 = 0; - for(unsigned pos = 0; pos < len; pos++) - { - char c = s[pos]; - switch(c) - { - case '\n': - r[pos2++] = '\r'; - r[pos2++] = '\n'; - break; - - case '\r': - break; - - default: - r[pos2++]= c; - break; - } - } - r.truncate(pos2); - return r; -} - static QCString encodeCString(const QCString& e) { @@ -318,8 +286,7 @@ QByteArray HTMLFormElementImpl::formData // append body unsigned int old_size = form_data.size(); - QCString body = expandLF(*it); - form_data.resize( old_size + hstr.length() + body.size() + 1); + form_data.resize( old_size + hstr.length() + (*it).size() + 1); memcpy(form_data.data() + old_size, hstr.data(), hstr.length()); - memcpy(form_data.data() + old_size + hstr.length(), body.data(), body.size()); + memcpy(form_data.data() + old_size + hstr.length(), *it, (*it).size()); form_data[form_data.size()-2] = '\r'; form_data[form_data.size()-1] = '\n';