Skip to content

Commit

Permalink
Merge pull request #600 from ArtisanCloud/revert-599-develop
Browse files Browse the repository at this point in the history
Revert "fix(kernel): call Server.Serve nil pointer fixed"
  • Loading branch information
Matrix-X authored Jan 1, 2025
2 parents 27ddb84 + 107c134 commit e785745
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/kernel/serverGuard.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,7 @@ func (serverGuard *ServerGuard) Serve(request *http.Request) (response *http.Res

response, err = validatedGuard.Resolve(request)

if response != nil {
logger.Info("Server response created:", "content", response.ContentLength)
}
logger.Info("Server response created:", "content", response.ContentLength)

return response, err
}
Expand Down Expand Up @@ -436,7 +434,7 @@ func (serverGuard *ServerGuard) ParseMessage(content string, dataType string) (c
callback = &models.Callback{}

if len(content) <= 0 {
return callback, nil
return nil, errors.New("request body is empty")
}

if dataType == messages.DataTypeXML {
Expand Down

0 comments on commit e785745

Please sign in to comment.