Skip to content

Commit

Permalink
Merge branch 'master' into guess_encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils authored Aug 7, 2020
2 parents 2fe8f3a + 029b077 commit 06f67d6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Unreleased: mitmproxy next

* Add MsgPack content viewer (@tasn)
* Use `@charset` to decode CSS files if available (@prinzhorn)
* Fix links to anticache docs in mitmweb and use HTTPS for links to documentation (@rugk)
* Updated typing for WebsocketMessage.content (@prinzhorn)

* --- TODO: add new PRs above this line ---

Expand Down
2 changes: 1 addition & 1 deletion mitmproxy/tools/console/defaultkeys.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def map(km):
km.add("ctrl f", "console.nav.pagedown", ["global"], "Page down")
km.add("ctrl b", "console.nav.pageup", ["global"], "Page up")

km.add("I", "set intercept_active toggle", ["global"], "Toggle intercept")
km.add("I", "set intercept_active toggle", ["global"], "Toggle whether the filtering via the intercept option is enabled")
km.add("i", "console.command.set intercept", ["global"], "Set intercept")
km.add("W", "console.command.set save_stream_file", ["global"], "Stream to file")
km.add("A", "flow.resume @all", ["flowlist", "flowview"], "Resume all intercepted flows")
Expand Down
4 changes: 2 additions & 2 deletions mitmproxy/websocket.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import time
import queue
from typing import List, Optional
from typing import List, Optional, Union

from wsproto.frame_protocol import CloseReason
from wsproto.frame_protocol import Opcode
Expand All @@ -17,7 +17,7 @@ class WebSocketMessage(serializable.Serializable):
"""

def __init__(
self, type: int, from_client: bool, content: bytes, timestamp: Optional[float]=None, killed: bool=False
self, type: int, from_client: bool, content: Union[bytes, str], timestamp: Optional[float]=None, killed: bool=False
) -> None:
self.type = Opcode(type) # type: ignore
"""indicates either TEXT or BINARY (from wsproto.frame_protocol.Opcode)."""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps =
setenv = HOME = {envtmpdir}
commands =
mitmdump --version
pytest --timeout 60 -v --cov-report xml \
pytest --timeout 60 -vv --cov-report xml \
--cov=mitmproxy --cov=pathod --cov=release \
--full-cov=mitmproxy/ --full-cov=pathod/ \
{posargs}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ exports[`OptionMenu Component should render correctly 1`] = `
/>
Strip cache headers
<a
href="http://docs.mitmproxy.org/en/stable/features/anticache.html"
href="https://docs.mitmproxy.org/stable/overview-features/#anticache"
target="_blank"
>
<i
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`DocsLink Component should be able to be rendered with children nodes 1`] = `
<a
href="http://docs.mitmproxy.org/en/stable/bar"
href="https://docs.mitmproxy.org/stable/bar"
target="_blank"
>
foo
Expand All @@ -11,7 +11,7 @@ exports[`DocsLink Component should be able to be rendered with children nodes 1`

exports[`DocsLink Component should be able to be rendered without children nodes 1`] = `
<a
href="http://docs.mitmproxy.org/en/stable/bar"
href="https://docs.mitmproxy.org/stable/bar"
target="_blank"
>
<i
Expand Down
2 changes: 1 addition & 1 deletion web/src/js/components/Header/OptionMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function OptionMenu({ openOptions }) {
<div className="menu-group">
<div className="menu-content">
<SettingsToggle setting="anticache">
Strip cache headers <DocsLink resource="features/anticache.html"/>
Strip cache headers <DocsLink resource="overview-features/#anticache"/>
</SettingsToggle>
<SettingsToggle setting="showhost">
Use host header for display
Expand Down
2 changes: 1 addition & 1 deletion web/src/js/components/common/DocsLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DocsLink.propTypes = {
}

export default function DocsLink({ children, resource }) {
let url = `http://docs.mitmproxy.org/en/stable/${resource}`
let url = `https://docs.mitmproxy.org/stable/${resource}`
return (
<a target="_blank" href={url}>
{children || <i className="fa fa-question-circle"></i>}
Expand Down

0 comments on commit 06f67d6

Please sign in to comment.