Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-7438

Protocol defaults to http when schemes not defined in OAS

    XMLWordPrintable

Details

    • False
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • undefined
    • Workaround Exists
    • Hide

      Set the schemes property with the https value.

      Show
      Set the schemes property with the https value.
    • Hide

      Upload an OAS 2.0 spec without the schemes property defined and the error shared in the description section is seen because the protocol is set to http from an https webpage.

      Show
      Upload an OAS 2.0 spec without the schemes property defined and the error shared in the description section is seen because the protocol is set to http from an https webpage.

    Description

      Expected behaviour

      If schemes is not defined then the protocol over which the swagger spec was requested should be set.

      Current behaviour

      If schemes is not defined then the protocol always defaults to http.

      Error returned is:

      <html>
      <head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
      <body>
      <center><h1>400 Bad Request</h1></center>
      <center>The plain HTTP request was sent to HTTPS port</center>
      <hr><center>cloudflare</center>
      </body>
      </html>
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      <!-- a padding to disable MSIE and Chrome friendly error page -->
      

      There was a bug in swagger-js which was fixed here and when inspecting the client.js file used with our swagger-ui-2.2.10.js lib I can see that it contains the fixed referenced in that commit so why is http still being set? I added the spec here in my admin portal and the error can be reproduced here

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-keprice Kevin Price
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: