<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div style="font-family:Arial;">Hi,<br></div>
<div style="font-family:Arial;"><br>I'm really sorry you've had such difficulty!  We're using Cyrus with http/1.1 at FastMail, so I don't have any direct experience with http/2.  We're also not using TLS directly in Cyrus, because we use an nginx proxy in front which terminates the TLS connections.</div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">You can enable regular telemetry logging to get http logs:<br></div>
<div style="font-family:Arial;"><a href="https://cyrusimap.org/imap/reference/faqs/o-telemetry.html"><br></a></div>
<div style="font-family:Arial;"><a href="https://cyrusimap.org/imap/reference/faqs/o-telemetry.html">https://cyrusimap.org/imap/reference/faqs/o-telemetry.html</a><br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Ken (CC'd) is our expert on the http/2 code, so hopefully he can help you.<br></div>
<div style="font-family:Arial;"><br>Bron.<br></div>
<div><br></div>
<div><br></div>
<div>On Tue, May 22, 2018, at 03:47, Zhivko Vasilev wrote:<br></div>
<blockquote type="cite"><div>Hello Everyone,<br></div>
<div><br></div>
<div>I hope you can help me.<br></div>
<div><br></div>
<div>I'm implementing a JMAP client and try to use Cyrus as reference server.<br></div>
<div>Send and Receive via IMAP/SMTP work fine.<br></div>
<div>But when I try to connect via HTTP/2 , connection is reset by HTTP/2 reset stream command.<br></div>
<div><br></div>
<div>imapd.log file show only  "starttls: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits new) no authentication"<br></div>
<div><br></div>
<div>My http2 call is POST <a href="https://my.ip.address:443/jmap">https://</a><a href="mailto:u1@cyrus.mailtemi.com">cyrus.mailtemi.com</a><a href="https://my.ip.address:443/jmap">:443/jmap</a><br></div>
<div>HEADERS:<br></div>
<div>"accept", "application/json"<br></div>
<div>"content-type", "application/json"<br></div>
<div>"Authorization", "base64 encoded user name:pass"<br></div>
<div>BODY:<br></div>
<div>{"methodCalls":[["Mailbox/get",{},"#1"]],"using":["jmap-core","jmap-mail"]}<br></div>
<div><br></div>
<div>Is there a way to turn on HTTP log to track what I do incorrectly.<br></div>
<div><br></div>
<div>I tried to track with curl  the server allways reponded with HTTP error 301.<br></div>
<div>The  command I've tried was<br></div>
<div>"curl --verbose --http2 -X POST \<br></div>
<div>     -H "Content-Type: application/json" \<br></div>
<div>     -H "Accept: application/json" \<br></div>
<div>     --user <a href="mailto:u1@cyrus.mailtemi.com">u1@cyrus.mailtemi.com</a>:q \<br></div>
<div>     -d '[["Mailbox/get", {}, "#1"],"using":["jmap-core","jmap-mail"]]' \<br></div>
<div>     <a href="http://35.192.121.94/jmap">http://</a>35.192.121.94<a href="https://my.ip.address:443/jmap">:443</a><a href="http://35.192.121.94/jmap">/jmap</a>"<br></div>
<div>returned<br></div>
<div>* Connected to 35.192.121.94 (35.192.121.94) port 80 (#0)<br></div>
<div>* Server auth using Basic with user '<a href="mailto:u1@cyrus.mailtemi.com">u1@cyrus.mailtemi.com</a>'<br></div>
<div>> POST /jmap HTTP/1.1<br></div>
<div>> Host: 35.192.121.94<br></div>
<div>> Authorization: Basic dTFAY3lydXMubWFpbHRlbWkuY29tOnE=<br></div>
<div>> User-Agent: curl/7.58.0<br></div>
<div>> Connection: Upgrade, HTTP2-Settings<br></div>
<div>> Upgrade: h2c<br></div>
<div>> HTTP2-Settings: AAMAAABkAARAAAAAAAIAAAAA<br></div>
<div>> Content-Type: application/json<br></div>
<div>> Accept: application/json<br></div>
<div>> Content-Length: 61<br></div>
<div>><br></div>
<div>* upload completely sent off: 61 out of 61 bytes<br></div>
<div>< HTTP/1.1 101 Switching Protocols<br></div>
<div>< Connection: Upgrade<br></div>
<div>< Upgrade: h2c<br></div>
<div>* Received 101<br></div>
<div>* Using HTTP2, server supports multi-use<br></div>
<div>* Connection state changed (HTTP/2 confirmed)<br></div>
<div>* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0<br></div>
<div>* Connection state changed (MAX_CONCURRENT_STREAMS updated)!<br></div>
<div>< HTTP/2 301<br></div>
<div>< date: Mon, 21 May 2018 17:36:58 GMT<br></div>
<div>< location: /jmap/<br></div>
<div>< vary: Accept-Encoding<br></div>
<div>< content-length: 0<br></div>
<div><<br></div>
<div>* Connection #0 to host 35.192.121.94 left intact<br></div>
<div><br></div>
<div>Please give me some advice or clue how to track what is the problem.<br></div>
<div>I'm stuck at this point for two days :(<br></div>
<div><br></div>
<div>Thanks ,<br></div>
<div>Zhivko Vasilev<br></div>
<div><br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div id="sig56629417"><div class="signature">--<br></div>
<div class="signature">  Bron Gondwana, CEO, FastMail Pty Ltd<br></div>
<div class="signature">  brong@fastmailteam.com<br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:Arial;"><br></div>
</body>
</html>