Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Content Length null or undefined #40

Closed
oghcfb opened this issue May 15, 2018 · 2 comments
Closed

Request Content Length null or undefined #40

oghcfb opened this issue May 15, 2018 · 2 comments
Assignees
Labels

Comments

@oghcfb
Copy link

oghcfb commented May 15, 2018

https://github.com/slanatech/swagger-stats/blob/master/lib/swsAPIStats.js

this.promClientMetrics.api_response_size_bytes.labels(req.method,req.sws.api_path,res.statusCode).observe(req.sws.res_clength);

TypeError: Invalid value: is not number

bug - req.sws.res_clength

https://github.com/slanatech/swagger-stats/blob/master/lib/swsCoreStats.js

if ("_contentLength" in res){
    resContentLength = res['_contentLength'];
}else{
    // Try header
    if(res.hasHeader('content-length')) {
        resContentLength = res.getHeader('content-length');
    }
}

resContentLength - Null or Undefined

@sv2 sv2 self-assigned this May 16, 2018
@sv2 sv2 added the bug label May 16, 2018
@sv2
Copy link
Collaborator

sv2 commented Jul 11, 2018

Addressed by #43

@sv2
Copy link
Collaborator

sv2 commented Jul 11, 2018

Addressed in v0.95.6

@sv2 sv2 closed this as completed Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants