Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Api respond with html content instead of json response sometimes #70

Description

@benhaynes

From directus created by lk77 : directus/directus#2186

Version Info

  • Directus version and branch (Or commit hash):6.4.9
  • PHP version: 7.1.7
  • MySQL version: 5.5
  • Web server: (Ex. Apache, nginx or IIS?) : apache
  • OS name and version: ubuntu 16.04 running docker (with directus-docker image)

Hello,

i have a problem with the backend, it's not loading properly, because of incorrect response from the api
when the app is doing this request : PUT /api/1.1/tables/{table}/preferences HTTP/1.1

Expected Behavior

The backend interface is loading properly, without error

Actual Behavior

Red message with unknown server error is shown very often, it seems random.
The network tab shows only a "200 ok" response but content of the request is incorrect (see dump of request and response headers and response body in attachment),
there is an html page instead of json response, the script will do the request again, and it usually work, but there is a red message at each page, it's annoying.

Steps to Reproduce

  1. Login to the backend
  2. See the js fail to update data with the api sometimes
  3. Try another page
  4. Same thing, it fails frequently

Schema Dump, Logs, or Screenshots

compare_working_not_working.txt

i use nginx reverse proxy to access the docker containers, but i have the problem too when accessing the container directly on the mapped port on host.

if you have ideas why this is happening.

thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions