aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http
Commit message (Collapse)AuthorAgeFilesLines
* Fix test that may fail due to binary header dataAldo Cortesi2016-06-051-1/+3
| | | | | | | | This is just inherently not a determinisitc test. We don't use the log HTTP interface any more, so it can just go. A more radical "solution" is inbound shortly. Fixes #1207
* Utils reorganisation: add netlib.strutilsAldo Cortesi2016-06-023-7/+7
| | | | Extract a number of string and format-related functions to netlib.strutils.
* Merge pull request #1183 from mitmproxy/module-importsAldo Cortesi2016-06-011-1/+3
|\ | | | | use module-level imports only
| * use module-level imports onlyMaximilian Hils2016-05-311-1/+3
| |
* | Reorganise netlib imports according to Google Style GuideAldo Cortesi2016-06-0112-112/+117
|/
* be more strict about module namespacesMaximilian Hils2016-05-311-4/+4
|
* Fix tests harderAldo Cortesi2016-05-311-2/+2
|
* http2.frame -> http2.framereaderAldo Cortesi2016-05-311-0/+0
|
* Satisfy flake8Aldo Cortesi2016-05-312-1/+2
|
* Move human-friendly format functions to netlib.human, remove redundant ↵Aldo Cortesi2016-05-311-2/+2
| | | | implementations
* utils.multipartdecode -> http.multipart.decodeAldo Cortesi2016-05-313-1/+61
| | | | | | also utils.parse_content_type -> http.headers.parse_content_type
* netlib.utils.get_header_tokens -> netlib.http1.read.get_header_tokensAldo Cortesi2016-05-311-1/+13
| | | | Placing this next to its only use.
* Module is part of the name - url.decode, not url.urldecodeAldo Cortesi2016-05-314-15/+15
| | | | A pattern we need to use far more often in the codebase
* Extract url functions from netlib.utils and move to netlib.http.urlAldo Cortesi2016-05-314-12/+109
|
* Start cleaning up netlib.utilsAldo Cortesi2016-05-314-39/+60
| | | | | - Remove http2 functions, move to http2.frame - Remove Serializable, move to netlib.basetypes
* Improve handling of pseudo-headersAldo Cortesi2016-05-311-6/+8
| | | | | | | | | - The canonical source for :method, :scheme and :path are the .method, .scheme and .path attributes on the request object. - These pseudo-headers are stripped after reading the request, and re-inserted just before sending. - The :authority header remains, and should be handled analagously to the Host header in HTTP1 with respect to display and user interaction.
* Satisfy flake8Aldo Cortesi2016-05-301-5/+0
|
* more style cleanupThomas Kriechbaumer2016-05-292-3/+3
|
* more style cleanupThomas Kriechbaumer2016-05-291-2/+2
| | | | Use this to check: flake8 --count mitmproxy netlib pathod examples test
* fix testsMaximilian Hils2016-05-283-3/+3
|
* netlib: fix most flake8 offensesThomas Kriechbaumer2016-05-284-9/+24
|
* cleanup imports with flake8Thomas Kriechbaumer2016-05-284-5/+0
|
* Merge branch 'issue-1099'Maximilian Hils2016-05-201-0/+6
|\
| * fix #1099Maximilian Hils2016-05-201-0/+6
| |
* | A clearer implementation of MultiDictViewAldo Cortesi2016-05-214-97/+55
|/ | | | | | This makes MultiDictView work with a simple getter/setter pair, rather than using attributes with implicit leading underscores. Also move MultiDictView into multidict.py and adds some simple unit tests.
* tests++Maximilian Hils2016-05-202-3/+3
|
* fix Header docsMaximilian Hils2016-05-201-3/+3
|
* improve MultiDict, add ImmutableMultiDict, adjust response.cookiesMaximilian Hils2016-05-186-87/+123
|
* add MultiDictMaximilian Hils2016-05-187-136/+137
| | | | | | | | This commit introduces MultiDict, a multi-dictionary similar to ODict, but with improved semantics (as in the Headers class). MultiDict fixes a few issues that were present in the Request/Response API. In particular, `request.cookies["foo"] = "bar"` has previously been a no-op, as the cookies property returned a mutable _copy_ of the cookies.
* replace SimpleCookie with our own parser libThomas Kriechbaumer2016-05-111-1/+1
|
* improve cookie parsingThomas Kriechbaumer2016-05-103-37/+20
| | | | | allows '/' to be within a cookie name removes deprecated cookie getter/setter fixes #1118
* fix #1120Maximilian Hils2016-05-091-1/+1
|
* fix CONNECT display in upstream modeMaximilian Hils2016-04-201-0/+2
|
* peer_address -> ip_addressMaximilian Hils2016-04-111-0/+1
|
* Merge branch 'better-replace'Maximilian Hils2016-04-033-1/+66
|\
| * improve .replace() and move it into netlibMaximilian Hils2016-04-023-1/+66
| |
* | Merge pull request #1074 from mitmproxy/move-response-refreshThomas Kriechbaumer2016-04-032-0/+68
|\ \ | | | | | | move HTTPResponse.refresh into netlib
| * | move HTTPResponse.refresh into netlibMaximilian Hils2016-04-022-0/+68
| |/
* | Merge pull request #1073 from mitmproxy/first-line-formatThomas Kriechbaumer2016-04-032-25/+4
|\ \ | | | | | | form_(in|out) -> first_line_format
| * | form_(in|out) -> first_line_formatMaximilian Hils2016-04-022-25/+4
| |/
* / response.msg -> response.reasonMaximilian Hils2016-04-021-10/+0
|/
* add Serializeable.copyMaximilian Hils2016-04-024-11/+4
|
* s/nocover/no cover/gThomas Kriechbaumer2016-03-275-25/+25
| | | according to coveralls docs
* update commentsMatthew Shao2016-03-261-4/+4
|
* replace CONTENT_MISSING with None.Matthew Shao2016-03-263-10/+6
|
* Setting CONTENT_MISSING to NoneMatthew Shao2016-03-261-1/+1
|
* netlib: request.path can be NoneMaximilian Hils2016-03-201-1/+4
|
* Merge remote-tracking branch 'duffer/pretty-host'Maximilian Hils2016-02-181-1/+24
|
* combine projectsMaximilian Hils2016-02-1814-0/+2353
span class="cm">** modification, are permitted provided that the following conditions are ** met: ** * Redistributions of source code must retain the above copyright ** notice, this list of conditions and the following disclaimer. ** * Redistributions in binary form must reproduce the above copyright ** notice, this list of conditions and the following disclaimer in ** the documentation and/or other materials provided with the ** distribution. ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor ** the names of its contributors may be used to endorse or promote ** products derived from this software without specific prior written ** permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ** ****************************************************************************/ #ifndef QTPROPERTYMANAGER_H #define QTPROPERTYMANAGER_H #include "qtpropertybrowser.h" #if QT_VERSION >= 0x040400 QT_BEGIN_NAMESPACE #endif class QDate; class QTime; class QDateTime; class QLocale; class QT_QTPROPERTYBROWSER_EXPORT QtGroupPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: QtGroupPropertyManager(QObject *parent = 0); ~QtGroupPropertyManager(); protected: virtual bool hasValue(const QtProperty *property) const; virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); }; class QtIntPropertyManagerPrivate; class QT_QTPROPERTYBROWSER_EXPORT QtIntPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: QtIntPropertyManager(QObject *parent = 0); ~QtIntPropertyManager(); int value(const QtProperty *property) const; int minimum(const QtProperty *property) const; int maximum(const QtProperty *property) const; int singleStep(const QtProperty *property) const; public Q_SLOTS: void setValue(QtProperty *property, int val); void setMinimum(QtProperty *property, int minVal); void setMaximum(QtProperty *property, int maxVal); void setRange(QtProperty *property, int minVal, int maxVal); void setSingleStep(QtProperty *property, int step); Q_SIGNALS: void valueChanged(QtProperty *property, int val); void rangeChanged(QtProperty *property, int minVal, int maxVal); void singleStepChanged(QtProperty *property, int step); protected: QString valueText(const QtProperty *property) const; virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: QtIntPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtIntPropertyManager) Q_DISABLE_COPY(QtIntPropertyManager) }; class QtBoolPropertyManagerPrivate; class QT_QTPROPERTYBROWSER_EXPORT QtBoolPropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: QtBoolPropertyManager(QObject *parent = 0); ~QtBoolPropertyManager(); bool value(const QtProperty *property) const; public Q_SLOTS: void setValue(QtProperty *property, bool val); Q_SIGNALS: void valueChanged(QtProperty *property, bool val); protected: QString valueText(const QtProperty *property) const; QIcon valueIcon(const QtProperty *property) const; virtual void initializeProperty(QtProperty *property); virtual void uninitializeProperty(QtProperty *property); private: QtBoolPropertyManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(QtBoolPropertyManager) Q_DISABLE_COPY(QtBoolPropertyManager) }; class QtDoublePropertyManagerPrivate; class QT_QTPROPERTYBROWSER_EXPORT QtDoublePropertyManager : public QtAbstractPropertyManager { Q_OBJECT public: QtDoublePropertyManager(QObject *parent = 0); ~QtDoublePropertyManager(); double value(const QtProperty *property) const; double minimum(const QtProperty *property) const; double maximum(const QtProperty *property) const; double singleStep(const QtProperty *property) const; int decimals(const QtProperty *property) const; public Q_SLOTS: void setValue(QtProperty *property, double val); void setMinimum(QtProperty *property, double minVal); void setMaximum(QtProperty *property, double maxVal); void setRange(QtProperty *property, double minVal, double maxVal); void setSingleStep(QtProperty *property, double step); void setDecimals(QtProperty *property, int prec); Q_SIGNALS: void valueChanged(QtProperty *property, double val); void rangeChanged(QtProperty *property, double minVal, double maxVal); void singleStepChanged(QtProperty *property, double step);