# Http protocol error

**URL:** <https://discourse.mitmproxy.org/t/http-protocol-error/804>\
**Category:** help\
**Created:** [January 18, 2018, 8:47pm UTC](https://discourse.mitmproxy.org/t/http-protocol-error/804 "2018-01-18T20:47:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Totoro](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@Totoro](https://discourse.mitmproxy.org/u/Totoro)\
**Post date:** [January 18, 2018, 8:47pm UTC](https://discourse.mitmproxy.org/t/http-protocol-error/804/1 "2018-01-18T20:47:53Z")

</div>

When trying to intercept an ssh connection I get back the following error:

HTTP protocol error in client request: Bad HTTP request line: b’SSH-2.0-libssh2\_1.8.0’

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [January 18, 2018, 9:07pm UTC](https://discourse.mitmproxy.org/t/http-protocol-error/804/2 "2018-01-18T21:07:02Z")

</div>

We don’t support SSH interception out of the box - I do have a PoC, but it’s not public at the moment. What’s your use case?

---

<div class="post-metadata">

**Author:** ![Totoro](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@Totoro](https://discourse.mitmproxy.org/u/Totoro)\
**Post date:** [January 18, 2018, 9:27pm UTC](https://discourse.mitmproxy.org/t/http-protocol-error/804/3 "2018-01-18T21:27:31Z")

</div>

Personal use trying to grow my skills and playing with the different things I can intercept between my VM’s. Everything being done is in my own virtual network and my own setup servers.

---

<div class="post-metadata">

**Author:** ![jupiter95](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jupiter95](https://discourse.mitmproxy.org/u/jupiter95)\
**Post date:** [March 27, 2019, 4:11pm UTC](https://discourse.mitmproxy.org/t/http-protocol-error/804/4 "2019-03-27T16:11:19Z")

</div>

I encountered Http protocol error in standard Http.

The trafic comes from embedded system which I can not change at the moment.

It is fully accepted in Apache/2.2.14 but after upgrade to Apache/2.4.29 it is rejected.

I thought mitmproxy could provide a workaround but I can not configure it this way.

In mitmproxy --mode transparent I get an error:

HTTP protocol error in client request: Unknown HTTP version: b’HTTP/1.0.9’

I thought using —replacements function I could correct the GET request in a way there will be HTTP/1.1 protocol version indication.

Is it possible to do it in mitmproxy ?

If yes, Can you give me some guidelines?

If it is not possible in mitmproxy any thoughts on workaround? (I am not able to use Apache/2.2.14 anymore)
