Why 307 redirects from http -> https instead of 301?

I'm curious about the decision to use 307 redirects from http -> https instead of 301. Everything that I've read seems to say that a 307 is a temporary redirect, similar to 302. Why not make those redirects to https permanent (301)? This would tell webcrawers that they can link directly to the https version of the page and avoid the redirect in the future.

Right now, nearly all of our discuss.elastic.co pages have the http version indexed on Google.

Thanks,
Russ

307 is coming from your browser, we have HSTS here, so browser issue the 307 in dev tools, if you use curl it will be a 301.

Using curl, I'm actually seeing a 302 response, not a 301. Is there something I'm missing?

~ rsavage$ curl 'http://discuss.elastic.co/c/elasticsearch' -v
* Hostname was NOT found in DNS cache
*   Trying 64.62.211.227...
* Connected to discuss.elastic.co (64.62.211.227) port 80 (#0)
> GET /c/elasticsearch HTTP/1.1
> User-Agent: curl/7.37.1
> Host: discuss.elastic.co
> Accept: */*
>
< HTTP/1.1 302 Found
< Cache-Control: no-cache
< Content-length: 0
< Location: https://discuss.elastic.co/c/elasticsearch
< Connection: close
<
* Closing connection 0

ahhh .. k yeah we can change that to a 301 in haproxy...

Cool, fixed it up:

sam@ubuntu discourse % curl 'http://discuss.elastic.co/c/elasticsearch' -v
* Hostname was NOT found in DNS cache
*   Trying 64.62.211.227...
* Connected to discuss.elastic.co (64.62.211.227) port 80 (#0)
> GET /c/elasticsearch HTTP/1.1
> User-Agent: curl/7.35.0
> Host: discuss.elastic.co
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< Content-length: 0
< Location: https://discuss.elastic.co/c/elasticsearch
< Connection: close
< 
* Closing connection 0

Great! Thanks!