1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Upgrade to 3.1.1a to handle PS/PDF security advisory. There are additional

patches to kgv which are also included in this commit.

Submitted by:	Lauri Watts <lauri@kde.org>
This commit is contained in:
Will Andrews 2003-04-11 14:39:16 +00:00
parent 5f43e6f0c6
commit 145f2547fa
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78735
30 changed files with 390 additions and 388 deletions

View File

@ -0,0 +1,85 @@
--- kghostview/kgv_miniwidget.cpp.orig Fri Jan 3 05:55:05 2003
+++ kghostview/kgv_miniwidget.cpp Mon Apr 7 17:01:29 2003
@@ -293,23 +293,22 @@ void KGVMiniWidget::openPDFFileContinue(
}
_tmpDSC->close();
- _pdfFileName = _fileName;
- _fileName = _tmpDSC->name();
_format = PDF;
- openPSFile();
+ openPSFile(_tmpDSC->name());
}
-void KGVMiniWidget::openPSFile()
+void KGVMiniWidget::openPSFile(const QString &file)
{
+ QString fileName = file.isEmpty() ? _fileName : file;
kdDebug(4500) << "KGVMiniWidget::openPSFile" << endl;
- FILE* fp = fopen( QFile::encodeName( _fileName ), "r");
+ FILE* fp = fopen( QFile::encodeName( fileName ), "r");
if( fp == 0 )
{
KMessageBox::error( _part->widget(),
i18n( "<qt>Error opening file <nobr><strong>%1</strong></nobr>: %2</qt>" )
- .arg( _fileName )
+ .arg( fileName )
.arg( strerror( errno ) ) );
emit canceled( "" );
return;
@@ -320,9 +319,7 @@ void KGVMiniWidget::openPSFile()
_isFileOpen = true;
scanDSC();
buildTOC();
- _psWidget->setFileName( dsc()->isStructured()
- ? QString::null
- : _fileName );
+ _psWidget->setFileName( _fileName, dsc()->isStructured() );
emit completed();
}
}
@@ -859,6 +856,7 @@ bool KGVMiniWidget::convertFromPDF( cons
<< "-dNOPAUSE"
<< "-dBATCH"
<< "-dSAFER"
+ << "-dPARANOIDSAFER"
<< "-sDEVICE=pswrite"
<< ( QCString("-sOutputFile=")+QFile::encodeName(saveFileName) )
<< ( QString("-dFirstPage=")+QString::number( firstPage ) )
@@ -867,7 +865,7 @@ bool KGVMiniWidget::convertFromPDF( cons
<< "save"
<< "pop"
<< "-f"
- << QFile::encodeName(_pdfFileName);
+ << QFile::encodeName(_fileName);
/*QValueList<QCString> args = process.args();
QValueList<QCString>::Iterator it = args.begin();
@@ -1074,7 +1072,7 @@ void KGVMiniWidget::saveAs()
QString::null,
_part->widget(),
QString::null );
- if( !KIO::NetAccess::upload( _format == PDF ? _pdfFileName : _fileName,
+ if( !KIO::NetAccess::upload( _fileName,
saveURL ) )
; // TODO: Proper error dialog
}
@@ -1311,10 +1309,16 @@ void Pdf2dsc::run( const QString& pdfNam
_process = new KProcess;
*_process << _ghostscriptPath
+ << "-dSAFER"
+ << "-dPARANOIDSAFER"
+ << "-dDELAYSAFER"
<< "-dNODISPLAY"
<< "-dQUIET"
<< QString( "-sPDFname=%1" ).arg( pdfName )
<< QString( "-sDSCname=%1" ).arg( dscName )
+ << "-c"
+ << "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe"
+ << "-f"
<< "pdf2dsc.ps"
<< "-c"
<< "quit";

View File

@ -0,0 +1,28 @@
--- kghostview/kgv_miniwidget.h.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kgv_miniwidget.h Mon Apr 7 17:02:48 2003
@@ -85,7 +85,7 @@ protected:
void clearTemporaryFiles();
void uncompressFile();
- void openPSFile();
+ void openPSFile(const QString &file=QString::null);
protected slots:
void doOpenFile();
@@ -116,7 +116,7 @@ protected:
/*- PRINTING and SAVING ---------------------------------------------------*/
// private data used:
-// Document specific: _dsc, _fileName, _pdfFileName, _format, _origurl
+// Document specific: _dsc, _fileName, _format, _origurl
// View specific: _currentPage, _marklist
// This section only: _printer, _tmpFromPDF
@@ -267,7 +267,6 @@ private:
int _visiblePage;
QString _fileName;
- QString _pdfFileName;
QString _mimetype;
MarkList* _marklist;

View File

@ -0,0 +1,48 @@
--- kghostview/kpswidget.cpp.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kpswidget.cpp Mon Apr 7 17:04:00 2003
@@ -309,10 +309,11 @@ void KPSWidget::setGhostscriptArguments(
}
}
-void KPSWidget::setFileName( const QString& fileName )
+void KPSWidget::setFileName( const QString& fileName, bool usePipe )
{
- if( _fileName != fileName )
+ if(( _fileName != fileName ) || (_usePipe != usePipe))
{
+ _usePipe = usePipe;
_fileName = fileName;
stopInterpreter();
_ghostscriptDirty = true;
@@ -508,8 +509,11 @@ void KPSWidget::startInterpreter()
for( ; it != _ghostscriptArguments.end(); ++it )
*_process << (*it);
- if( _fileName.isEmpty() )
- *_process << "-";
+ if( _usePipe )
+ *_process <<
+ // The following two lines are their to ensure that we are allowed to read _fileName
+ "-dDELAYSAFER" << "-sInputFile="+_fileName << "-c" <<
+ "<< /PermitFileReading [ InputFile ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe";
else
*_process << _fileName << "-c" << "quit";
@@ -527,7 +531,7 @@ void KPSWidget::startInterpreter()
// Finally fire up the interpreter.
kdDebug(4500) << "KPSWidget: starting interpreter" << endl;
if( _process->start( KProcess::NotifyOnExit,
- _fileName.isEmpty() ? KProcess::All : KProcess::AllOutput ) )
+ _usePipe ? KProcess::All : KProcess::AllOutput ) )
{
_interpreterBusy = true;
setCursor( waitCursor );
@@ -648,7 +652,7 @@ void KPSWidget::readSettings()
if( !intConfig->platformFonts() )
arguments << "-dNOPLATFONTS";
- arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER";
+ arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER" << "-dPARANOIDSAFER";
setGhostscriptArguments( arguments );

View File

@ -0,0 +1,25 @@
--- kghostview/kpswidget.h.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kpswidget.h Mon Apr 7 17:05:04 2003
@@ -134,10 +134,11 @@ public:
bool sendPS( FILE*, unsigned int begin, unsigned int end );
/**
- * Sets the filename of the ghostscript input. Usually we use a pipe for
- * communication and no filename will be needed.
+ * Sets the filename of the ghostscript input.
+ * @p usePipe indicates whether we use a pipe for
+ * communication or let ghoscript read the file itself.
*/
- void setFileName( const QString& );
+ void setFileName( const QString&, bool usePipe );
/**
* Set the bounding box of the drawable. See my comment in the source
@@ -243,6 +244,7 @@ private:
QString _ghostscriptPath;
QStringList _ghostscriptArguments;
QString _fileName;
+ bool _usePipe;
/**
* Flag set when one of the properties _ghostscriptPath,

View File

@ -0,0 +1,85 @@
--- kghostview/kgv_miniwidget.cpp.orig Fri Jan 3 05:55:05 2003
+++ kghostview/kgv_miniwidget.cpp Mon Apr 7 17:01:29 2003
@@ -293,23 +293,22 @@ void KGVMiniWidget::openPDFFileContinue(
}
_tmpDSC->close();
- _pdfFileName = _fileName;
- _fileName = _tmpDSC->name();
_format = PDF;
- openPSFile();
+ openPSFile(_tmpDSC->name());
}
-void KGVMiniWidget::openPSFile()
+void KGVMiniWidget::openPSFile(const QString &file)
{
+ QString fileName = file.isEmpty() ? _fileName : file;
kdDebug(4500) << "KGVMiniWidget::openPSFile" << endl;
- FILE* fp = fopen( QFile::encodeName( _fileName ), "r");
+ FILE* fp = fopen( QFile::encodeName( fileName ), "r");
if( fp == 0 )
{
KMessageBox::error( _part->widget(),
i18n( "<qt>Error opening file <nobr><strong>%1</strong></nobr>: %2</qt>" )
- .arg( _fileName )
+ .arg( fileName )
.arg( strerror( errno ) ) );
emit canceled( "" );
return;
@@ -320,9 +319,7 @@ void KGVMiniWidget::openPSFile()
_isFileOpen = true;
scanDSC();
buildTOC();
- _psWidget->setFileName( dsc()->isStructured()
- ? QString::null
- : _fileName );
+ _psWidget->setFileName( _fileName, dsc()->isStructured() );
emit completed();
}
}
@@ -859,6 +856,7 @@ bool KGVMiniWidget::convertFromPDF( cons
<< "-dNOPAUSE"
<< "-dBATCH"
<< "-dSAFER"
+ << "-dPARANOIDSAFER"
<< "-sDEVICE=pswrite"
<< ( QCString("-sOutputFile=")+QFile::encodeName(saveFileName) )
<< ( QString("-dFirstPage=")+QString::number( firstPage ) )
@@ -867,7 +865,7 @@ bool KGVMiniWidget::convertFromPDF( cons
<< "save"
<< "pop"
<< "-f"
- << QFile::encodeName(_pdfFileName);
+ << QFile::encodeName(_fileName);
/*QValueList<QCString> args = process.args();
QValueList<QCString>::Iterator it = args.begin();
@@ -1074,7 +1072,7 @@ void KGVMiniWidget::saveAs()
QString::null,
_part->widget(),
QString::null );
- if( !KIO::NetAccess::upload( _format == PDF ? _pdfFileName : _fileName,
+ if( !KIO::NetAccess::upload( _fileName,
saveURL ) )
; // TODO: Proper error dialog
}
@@ -1311,10 +1309,16 @@ void Pdf2dsc::run( const QString& pdfNam
_process = new KProcess;
*_process << _ghostscriptPath
+ << "-dSAFER"
+ << "-dPARANOIDSAFER"
+ << "-dDELAYSAFER"
<< "-dNODISPLAY"
<< "-dQUIET"
<< QString( "-sPDFname=%1" ).arg( pdfName )
<< QString( "-sDSCname=%1" ).arg( dscName )
+ << "-c"
+ << "<< /PermitFileReading [ PDFname ] /PermitFileWriting [ DSCname ] /PermitFileControl [] >> setuserparams .locksafe"
+ << "-f"
<< "pdf2dsc.ps"
<< "-c"
<< "quit";

View File

@ -0,0 +1,28 @@
--- kghostview/kgv_miniwidget.h.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kgv_miniwidget.h Mon Apr 7 17:02:48 2003
@@ -85,7 +85,7 @@ protected:
void clearTemporaryFiles();
void uncompressFile();
- void openPSFile();
+ void openPSFile(const QString &file=QString::null);
protected slots:
void doOpenFile();
@@ -116,7 +116,7 @@ protected:
/*- PRINTING and SAVING ---------------------------------------------------*/
// private data used:
-// Document specific: _dsc, _fileName, _pdfFileName, _format, _origurl
+// Document specific: _dsc, _fileName, _format, _origurl
// View specific: _currentPage, _marklist
// This section only: _printer, _tmpFromPDF
@@ -267,7 +267,6 @@ private:
int _visiblePage;
QString _fileName;
- QString _pdfFileName;
QString _mimetype;
MarkList* _marklist;

View File

@ -0,0 +1,48 @@
--- kghostview/kpswidget.cpp.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kpswidget.cpp Mon Apr 7 17:04:00 2003
@@ -309,10 +309,11 @@ void KPSWidget::setGhostscriptArguments(
}
}
-void KPSWidget::setFileName( const QString& fileName )
+void KPSWidget::setFileName( const QString& fileName, bool usePipe )
{
- if( _fileName != fileName )
+ if(( _fileName != fileName ) || (_usePipe != usePipe))
{
+ _usePipe = usePipe;
_fileName = fileName;
stopInterpreter();
_ghostscriptDirty = true;
@@ -508,8 +509,11 @@ void KPSWidget::startInterpreter()
for( ; it != _ghostscriptArguments.end(); ++it )
*_process << (*it);
- if( _fileName.isEmpty() )
- *_process << "-";
+ if( _usePipe )
+ *_process <<
+ // The following two lines are their to ensure that we are allowed to read _fileName
+ "-dDELAYSAFER" << "-sInputFile="+_fileName << "-c" <<
+ "<< /PermitFileReading [ InputFile ] /PermitFileWriting [] /PermitFileControl [] >> setuserparams .locksafe";
else
*_process << _fileName << "-c" << "quit";
@@ -527,7 +531,7 @@ void KPSWidget::startInterpreter()
// Finally fire up the interpreter.
kdDebug(4500) << "KPSWidget: starting interpreter" << endl;
if( _process->start( KProcess::NotifyOnExit,
- _fileName.isEmpty() ? KProcess::All : KProcess::AllOutput ) )
+ _usePipe ? KProcess::All : KProcess::AllOutput ) )
{
_interpreterBusy = true;
setCursor( waitCursor );
@@ -648,7 +652,7 @@ void KPSWidget::readSettings()
if( !intConfig->platformFonts() )
arguments << "-dNOPLATFONTS";
- arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER";
+ arguments << "-dNOPAUSE" << "-dQUIET" << "-dSAFER" << "-dPARANOIDSAFER";
setGhostscriptArguments( arguments );

View File

@ -0,0 +1,25 @@
--- kghostview/kpswidget.h.orig Sun Sep 15 23:12:40 2002
+++ kghostview/kpswidget.h Mon Apr 7 17:05:04 2003
@@ -134,10 +134,11 @@ public:
bool sendPS( FILE*, unsigned int begin, unsigned int end );
/**
- * Sets the filename of the ghostscript input. Usually we use a pipe for
- * communication and no filename will be needed.
+ * Sets the filename of the ghostscript input.
+ * @p usePipe indicates whether we use a pipe for
+ * communication or let ghoscript read the file itself.
*/
- void setFileName( const QString& );
+ void setFileName( const QString&, bool usePipe );
/**
* Set the bounding box of the drawable. See my comment in the source
@@ -243,6 +244,7 @@ private:
QString _ghostscriptPath;
QStringList _ghostscriptArguments;
QString _fileName;
+ bool _usePipe;
/**
* Flag set when one of the properties _ghostscriptPath,

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdebase
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdebase-3.1.1.tar.bz2) = f360add935d13be629b43a2a280b759f
MD5 (KDE/kdebase-3.1.1a.tar.bz2) = 66069257f56c7e8b931c853029e2b093

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdelibs-3.1.1.tar.bz2) = 15eb9412c589126844b277b9e80cfffc
MD5 (KDE/kdelibs-3.1.1a.tar.bz2) = 77cc0b44b43ea239cb3f8e37d7814f1a

View File

@ -1,59 +0,0 @@
--- kio/kio/kzip.cpp.orig Fri Jan 3 05:58:47 2003
+++ kio/kio/kzip.cpp Fri Mar 21 11:13:48 2003
@@ -332,27 +332,43 @@
KArchiveEntry* entry;
if ( isdir )
- entry = new KArchiveDirectory( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null );
+ {
+ QString path = QDir::cleanDirPath( name.left( pos ) );
+ KArchiveEntry* ent = rootDir()->entry( path );
+ if ( ent && ent->isDirectory() )
+ {
+ //kdDebug(7040) << "Directory already exists, NOT going to add it again" << endl;
+ entry = 0L;
+ }
+ else
+ {
+ entry = new KArchiveDirectory( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null );
+ //kdDebug(7040) << "KArchiveDirectory created, entryName= " << entryName << ", name=" << name << endl;
+ }
+ }
else
{
entry = new KZipFileEntry( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null,
- name, dataoffset, ucsize, cmethod, csize );
+ name, dataoffset, ucsize, cmethod, csize );
static_cast<KZipFileEntry *>(entry)->setHeaderStart( localheaderoffset );
- //kdDebug(7040) << "KZipFileEntry created" << endl;
+ //kdDebug(7040) << "KZipFileEntry created, entryName= " << entryName << ", name=" << name << endl;
d->m_fileList.append( static_cast<KZipFileEntry *>( entry ) );
}
- if ( pos == -1 )
+ if ( entry )
{
- rootDir()->addEntry(entry);
- }
- else
- {
- // In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
- // Ensure container directory exists, create otherwise
- KArchiveDirectory * tdir = findOrCreate( path );
- tdir->addEntry(entry);
+ if ( pos == -1 )
+ {
+ rootDir()->addEntry(entry);
+ }
+ else
+ {
+ // In some tar files we can find dir/./file => call cleanDirPath
+ QString path = QDir::cleanDirPath( name.left( pos ) );
+ // Ensure container directory exists, create otherwise
+ KArchiveDirectory * tdir = findOrCreate( path );
+ tdir->addEntry(entry);
+ }
}
//calculate offset to next entry

View File

@ -1,126 +0,0 @@
--- kioslave/http/http.cc.orig Sun Mar 2 20:02:28 2003
+++ kioslave/http/http.cc Thu Mar 20 22:05:14 2003
@@ -438,7 +438,6 @@
kdDebug(7113) << "(" << m_pid << ") Unset tunneling flag!" << endl;
setEnableSSLTunnel( false );
m_bIsTunneled = true;
- m_bNeedTunnel = false;
// Reset the CONNECT response code...
m_responseCode = m_prevResponseCode;
continue;
@@ -1936,7 +1935,42 @@
// Check the validity of the current connection, if one exists.
httpCheckConnection();
- // Determine if this is a POST or GET method
+
+ if ( !m_bIsTunneled && m_bNeedTunnel )
+ {
+ setEnableSSLTunnel( true );
+ // We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't
+ // need any HTTP 1.1 capabilities for CONNECT - Waba
+ header = QString("CONNECT %1:%2 HTTP/1.0"
+ "\r\n").arg( m_request.hostname).arg(m_request.port);
+
+ // Identify who you are to the proxy server!
+ if (!m_request.userAgent.isEmpty())
+ header += "User-Agent: " + m_request.userAgent + "\r\n";
+
+ /* Add hostname information */
+ header += "Host: ";
+ if (m_state.hostname.find(':') != -1)
+ {
+ // This is an IPv6 (not hostname)
+ header += '[';
+ header += m_state.hostname;
+ header += ']';
+ }
+ else
+ {
+ header += m_state.hostname;
+ }
+
+ if (m_state.port != m_iDefaultPort)
+ header += QString(":%1").arg(m_state.port);
+ header += "\r\n";
+
+ header += proxyAuthenticationHeader();
+ }
+ else
+ {
+ // Determine the kind of method we are handling...
switch (m_request.method)
{
case HTTP_GET:
@@ -1944,12 +1978,12 @@
break;
case HTTP_PUT:
header = "PUT ";
- moreData = !m_bNeedTunnel;
+ moreData = true;
m_request.bCachedWrite = false; // Do not put any result in the cache
break;
case HTTP_POST:
header = "POST ";
- moreData = !m_bNeedTunnel;
+ moreData = true;
m_request.bCachedWrite = false; // Do not put any result in the cache
break;
case HTTP_HEAD:
@@ -2033,40 +2067,6 @@
return false;
}
- if ( !m_bIsTunneled && m_bNeedTunnel )
- {
- setEnableSSLTunnel( true );
- // We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't
- // need any HTTP 1.1 capabilities for CONNECT - Waba
- header = QString("CONNECT %1:%2 HTTP/1.0"
- "\r\n").arg( m_request.hostname).arg(m_request.port);
-
- // Identify who you are to the proxy server!
- if (!m_request.userAgent.isEmpty())
- header += "User-Agent: " + m_request.userAgent + "\r\n";
-
- /* Add hostname information */
- header += "Host: ";
- if (m_state.hostname.find(':') != -1)
- {
- // This is an IPv6 (not hostname)
- header += '[';
- header += m_state.hostname;
- header += ']';
- }
- else
- {
- header += m_state.hostname;
- }
-
- if (m_state.port != m_iDefaultPort)
- header += QString(":%1").arg(m_state.port);
- header += "\r\n";
-
- header += proxyAuthenticationHeader();
- }
- else
- {
// format the URI
if (m_state.doProxy && !m_bIsTunneled)
{
@@ -2271,7 +2271,6 @@
// Do we need to authorize to the proxy server ?
if ( m_state.doProxy && !m_bIsTunneled )
header += proxyAuthenticationHeader();
- }
if ( m_protocol == "webdav" || m_protocol == "webdavs" )
{
@@ -2289,6 +2288,7 @@
// add extra header elements for WebDAV
if ( !davHeader.isNull() )
header += davHeader;
+ }
}
kdDebug(7103) << "(" << m_pid << ") ============ Sending Header:" << endl;

View File

@ -7,7 +7,7 @@
#
PORTNAME= kdelibs
PORTVERSION= ${KDE_VERSION}
PORTVERSION= ${KDE_VERSION}a
PORTREVISION= 0
CATEGORIES= x11 kde
MASTER_SITES= ${MASTER_SITE_KDE}

View File

@ -1 +1 @@
MD5 (KDE/kdelibs-3.1.1.tar.bz2) = 15eb9412c589126844b277b9e80cfffc
MD5 (KDE/kdelibs-3.1.1a.tar.bz2) = 77cc0b44b43ea239cb3f8e37d7814f1a

View File

@ -1,59 +0,0 @@
--- kio/kio/kzip.cpp.orig Fri Jan 3 05:58:47 2003
+++ kio/kio/kzip.cpp Fri Mar 21 11:13:48 2003
@@ -332,27 +332,43 @@
KArchiveEntry* entry;
if ( isdir )
- entry = new KArchiveDirectory( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null );
+ {
+ QString path = QDir::cleanDirPath( name.left( pos ) );
+ KArchiveEntry* ent = rootDir()->entry( path );
+ if ( ent && ent->isDirectory() )
+ {
+ //kdDebug(7040) << "Directory already exists, NOT going to add it again" << endl;
+ entry = 0L;
+ }
+ else
+ {
+ entry = new KArchiveDirectory( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null );
+ //kdDebug(7040) << "KArchiveDirectory created, entryName= " << entryName << ", name=" << name << endl;
+ }
+ }
else
{
entry = new KZipFileEntry( this, entryName, access, time, rootDir()->user(), rootDir()->group(), QString::null,
- name, dataoffset, ucsize, cmethod, csize );
+ name, dataoffset, ucsize, cmethod, csize );
static_cast<KZipFileEntry *>(entry)->setHeaderStart( localheaderoffset );
- //kdDebug(7040) << "KZipFileEntry created" << endl;
+ //kdDebug(7040) << "KZipFileEntry created, entryName= " << entryName << ", name=" << name << endl;
d->m_fileList.append( static_cast<KZipFileEntry *>( entry ) );
}
- if ( pos == -1 )
+ if ( entry )
{
- rootDir()->addEntry(entry);
- }
- else
- {
- // In some tar files we can find dir/./file => call cleanDirPath
- QString path = QDir::cleanDirPath( name.left( pos ) );
- // Ensure container directory exists, create otherwise
- KArchiveDirectory * tdir = findOrCreate( path );
- tdir->addEntry(entry);
+ if ( pos == -1 )
+ {
+ rootDir()->addEntry(entry);
+ }
+ else
+ {
+ // In some tar files we can find dir/./file => call cleanDirPath
+ QString path = QDir::cleanDirPath( name.left( pos ) );
+ // Ensure container directory exists, create otherwise
+ KArchiveDirectory * tdir = findOrCreate( path );
+ tdir->addEntry(entry);
+ }
}
//calculate offset to next entry

View File

@ -1,126 +0,0 @@
--- kioslave/http/http.cc.orig Sun Mar 2 20:02:28 2003
+++ kioslave/http/http.cc Thu Mar 20 22:05:14 2003
@@ -438,7 +438,6 @@
kdDebug(7113) << "(" << m_pid << ") Unset tunneling flag!" << endl;
setEnableSSLTunnel( false );
m_bIsTunneled = true;
- m_bNeedTunnel = false;
// Reset the CONNECT response code...
m_responseCode = m_prevResponseCode;
continue;
@@ -1936,7 +1935,42 @@
// Check the validity of the current connection, if one exists.
httpCheckConnection();
- // Determine if this is a POST or GET method
+
+ if ( !m_bIsTunneled && m_bNeedTunnel )
+ {
+ setEnableSSLTunnel( true );
+ // We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't
+ // need any HTTP 1.1 capabilities for CONNECT - Waba
+ header = QString("CONNECT %1:%2 HTTP/1.0"
+ "\r\n").arg( m_request.hostname).arg(m_request.port);
+
+ // Identify who you are to the proxy server!
+ if (!m_request.userAgent.isEmpty())
+ header += "User-Agent: " + m_request.userAgent + "\r\n";
+
+ /* Add hostname information */
+ header += "Host: ";
+ if (m_state.hostname.find(':') != -1)
+ {
+ // This is an IPv6 (not hostname)
+ header += '[';
+ header += m_state.hostname;
+ header += ']';
+ }
+ else
+ {
+ header += m_state.hostname;
+ }
+
+ if (m_state.port != m_iDefaultPort)
+ header += QString(":%1").arg(m_state.port);
+ header += "\r\n";
+
+ header += proxyAuthenticationHeader();
+ }
+ else
+ {
+ // Determine the kind of method we are handling...
switch (m_request.method)
{
case HTTP_GET:
@@ -1944,12 +1978,12 @@
break;
case HTTP_PUT:
header = "PUT ";
- moreData = !m_bNeedTunnel;
+ moreData = true;
m_request.bCachedWrite = false; // Do not put any result in the cache
break;
case HTTP_POST:
header = "POST ";
- moreData = !m_bNeedTunnel;
+ moreData = true;
m_request.bCachedWrite = false; // Do not put any result in the cache
break;
case HTTP_HEAD:
@@ -2033,40 +2067,6 @@
return false;
}
- if ( !m_bIsTunneled && m_bNeedTunnel )
- {
- setEnableSSLTunnel( true );
- // We send a HTTP 1.0 header since some proxies refuse HTTP 1.1 and we don't
- // need any HTTP 1.1 capabilities for CONNECT - Waba
- header = QString("CONNECT %1:%2 HTTP/1.0"
- "\r\n").arg( m_request.hostname).arg(m_request.port);
-
- // Identify who you are to the proxy server!
- if (!m_request.userAgent.isEmpty())
- header += "User-Agent: " + m_request.userAgent + "\r\n";
-
- /* Add hostname information */
- header += "Host: ";
- if (m_state.hostname.find(':') != -1)
- {
- // This is an IPv6 (not hostname)
- header += '[';
- header += m_state.hostname;
- header += ']';
- }
- else
- {
- header += m_state.hostname;
- }
-
- if (m_state.port != m_iDefaultPort)
- header += QString(":%1").arg(m_state.port);
- header += "\r\n";
-
- header += proxyAuthenticationHeader();
- }
- else
- {
// format the URI
if (m_state.doProxy && !m_bIsTunneled)
{
@@ -2271,7 +2271,6 @@
// Do we need to authorize to the proxy server ?
if ( m_state.doProxy && !m_bIsTunneled )
header += proxyAuthenticationHeader();
- }
if ( m_protocol == "webdav" || m_protocol == "webdavs" )
{
@@ -2289,6 +2288,7 @@
// add extra header elements for WebDAV
if ( !davHeader.isNull() )
header += davHeader;
+ }
}
kdDebug(7103) << "(" << m_pid << ") ============ Sending Header:" << endl;