From 3e6c284757ffbb42aef34281567cf1adedd21ae9 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Wed, 27 Jul 2016 17:27:01 +0200
Subject: add contentviews to client

---
 web/src/js/components/ContentView/ContentLoader.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'web/src/js/components/ContentView/ContentLoader.jsx')

diff --git a/web/src/js/components/ContentView/ContentLoader.jsx b/web/src/js/components/ContentView/ContentLoader.jsx
index ba6702ca..9babb8f7 100644
--- a/web/src/js/components/ContentView/ContentLoader.jsx
+++ b/web/src/js/components/ContentView/ContentLoader.jsx
@@ -28,7 +28,8 @@ export default View => class extends React.Component {
     componentWillReceiveProps(nextProps) {
         if (
             nextProps.message.content !== this.props.message.content ||
-            nextProps.message.contentHash !== this.props.message.contentHash
+            nextProps.message.contentHash !== this.props.message.contentHash ||
+            nextProps.contentView !== this.props.contentView
         ) {
             this.updateContent(nextProps)
         }
@@ -52,7 +53,7 @@ export default View => class extends React.Component {
             return this.setState({request: undefined, content: ""})
         }
 
-        let requestUrl = MessageUtils.getContentURL(props.flow, props.message)
+        let requestUrl = MessageUtils.getContentURL(props.flow, props.message, props.contentView)
 
         // We use XMLHttpRequest instead of fetch() because fetch() is not (yet) abortable.
         let request = new XMLHttpRequest();
-- 
cgit v1.2.3


From ad5bebeda0f1da890d8ed94b6096515e03f44a25 Mon Sep 17 00:00:00 2001
From: Clemens <cle1000.cb@gmail.com>
Date: Thu, 28 Jul 2016 17:10:06 +0200
Subject: mitmproxy.contentviews added

---
 web/src/js/components/ContentView/ContentLoader.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'web/src/js/components/ContentView/ContentLoader.jsx')

diff --git a/web/src/js/components/ContentView/ContentLoader.jsx b/web/src/js/components/ContentView/ContentLoader.jsx
index 9babb8f7..e7a6f379 100644
--- a/web/src/js/components/ContentView/ContentLoader.jsx
+++ b/web/src/js/components/ContentView/ContentLoader.jsx
@@ -53,7 +53,7 @@ export default View => class extends React.Component {
             return this.setState({request: undefined, content: ""})
         }
 
-        let requestUrl = MessageUtils.getContentURL(props.flow, props.message, props.contentView)
+        let requestUrl = MessageUtils.getContentURL(props.flow, props.message, (View.name == 'ViewServer' ? props.contentView : undefined))
 
         // We use XMLHttpRequest instead of fetch() because fetch() is not (yet) abortable.
         let request = new XMLHttpRequest();
-- 
cgit v1.2.3

