<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style>
</head>
<body><div><br></div>
<div>Hello Bron, Ken,<br></div>
<div><br></div>
<div>To clarify, that I do not use official FastMail server.<br></div>
<div>I've built Cyrus sever from <a href="https://github.com/cyrusimap/cyrus-imapd">https://github.com/cyrusimap/cyrus-imapd</a><br></div>
<div>With JMAP and HTTP/2 support enabled. Assume this is the closest implementation to the JMAP RFC?<br></div>
<div><br></div>
<div>Seem the problem is with HTTP/2 settings frame. Client and server exchange their settings frame, but on the first data frame, the server reset the stream with PROTOCOL_ERROR  0x1.<br></div>
<div>From the source, I saw that Cyrus uses nghttp2 and they provide sample http/2 server, so I'll try to use it to see what happens.<br></div>
<div>So most probably it is a http/2 compatibility issue.<br></div>
<div><br></div>
<div>After dig the Cyrus code seems HTTP/2 callback code is located in http_h2.c and there are syslog calls , but cannot make it log.<br></div>
<div><br></div>
<div>Thanks a lot,<br></div>
<div>Zhivko Vasilev<br></div>
<div><br></div>
<div>On Tue, May 22, 2018, at 7:19 AM, Ken Murchison wrote:<br></div>
<blockquote type="cite"><p>I am just back home after a holiday.  I will look into this
      sometime today or tomorrow after I catch up on other items.<br></p><p><br></p><div><br></div>
<div>On 05/21/2018 01:47 PM, Zhivko Vasilev
      wrote:<br></div>
<blockquote type="cite" cite="mid:1526924843.3690453.1379662568.7A97B3C7@webmail.messagingengine.com"><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><br></div>
<pre>-- 
Ken Murchison
Cyrus Development Team
FastMail US LLC<br></pre><p>Email had 1 attachment:<br></p><ul><li><div><code>murch.vcf</code><br></div>
<div>  1k (text/x-vcard)<br></div>
</li></ul></blockquote><div><br></div>
</body>
</html>