Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitca2d449

Browse files
committed
Fix proxy error status code
1 parentad90bcb commitca2d449

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎coderd/parameters_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ package coderd_test
22

33
import (
44
"context"
5-
"github.com/coder/coder/provisioner/echo"
6-
"github.com/coder/coder/provisionersdk/proto"
75
"net/http"
86
"testing"
97

8+
"github.com/coder/coder/provisioner/echo"
9+
"github.com/coder/coder/provisionersdk/proto"
10+
1011
"github.com/stretchr/testify/require"
1112

1213
"github.com/coder/coder/coderd/coderdtest"

‎coderd/workspaceapps.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ func (api *API) workspaceAppsProxyPath(rw http.ResponseWriter, r *http.Request)
129129
StatusCode:http.StatusBadGateway,
130130
Message:err.Error(),
131131
}))
132-
w.WriteHeader(http.StatusBadGateway)
133132
api.siteHandler.ServeHTTP(w,r)
134133
}
135134
path:=chi.URLParam(r,"*")

‎coderd/workspaceapps_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,6 @@ func TestWorkspaceAppsProxyPath(t *testing.T) {
120120
resp,err:=client.Request(context.Background(),http.MethodGet,"/@me/"+workspace.Name+"/apps/fake/",nil)
121121
require.NoError(t,err)
122122
deferresp.Body.Close()
123-
require.Equal(t,http.StatusBadGateway,resp.StatusCode)
123+
require.Equal(t,http.StatusOK,resp.StatusCode)
124124
})
125125
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp