I receive a response 401 when trying to upload a file from my local machine in one of my requests. I have ran the script in DEBUG mode and receive this:
13:06:06.940 [DEBUG] i.g.h.e.r.DefaultStatsProcessor - Request 'UPLOAD' failed for user 1: status.find.in([200, 209], 304), found 401
13:06:06.958 [DEBUG] i.g.h.e.r.DefaultStatsProcessor -
>>>>>>>>>>>>>>>>>>>>>>>>>>
Request:
UPLOAD: KO status.find.in([200, 209], 304), found 401
=========================
Session:
Session(V7UploadPNG,1,HashMap(gatling.http.cache.baseUrl -> https://mht03ccweb01:8081, gatling.http.ssl.sslContexts -> io.gatling.http.util.SslContexts@2d11acd2, gatling.http.referer -> https://mht03ccweb01:8081/cc/FileUpload.do, gatling.http.cookies -> CookieJar(Map(CookieKey(jsessionid,mht03ccweb01,/cc) -> StoredCookie(JSESSIONID=1F8D83CC59679E15BC3EBA8422661D79, path=/cc, secure, HTTPOnly,true,false,1714392338598), CookieKey(rcounter,mht03ccweb01,/cc) -> StoredCookie(rcounter=5,true,false,1714392354886))), gatling.http.cache.dns -> io.gatling.http.resolver.ShufflingNameResolver@33cd6290, gatling.http.cache.contentCache -> io.gatling.core.util.cache.Cache@7ca4c165),KO,List(),io.gatling.core.protocol.ProtocolComponentsRegistry$$Lambda/0x00000216d54f2968@519c2190,io.netty.channel.nio.NioEventLoop@2fe88a09)
=========================
HTTP request:
POST https://mht03ccweb01:8081/cc/FileUpload.do
headers:
authorization: Basic a21jYnI=:Z3c5OQ==
dnt: 1
Cache-Control: no-cache
accept-language: en-US, en-GB; q=0.7, en; q=0.3
accept: image/gif, image/jpeg, image/pjpeg, application/x-ms-application, application/xaml+xml, application/x-ms-xbap, */*
user-agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
Content-Type: multipart/form-data; boundary=---------------------------7e8803768040e
accept-encoding: gzip, deflate
referer: https://mht03ccweb01:8081/cc/ClaimCenter.do?ts=43304164
cookie: JSESSIONID=1F8D83CC59679E15BC3EBA8422661D79; rcounter=5
origin: https://mht03ccweb01:8081
host: mht03ccweb01:8081
content-length: 572
cookies:
JSESSIONID=1F8D83CC59679E15BC3EBA8422661D79, path=/cc, secure, HTTPOnly
rcounter=5
body:ByteArrayRequestBody{content (Base64)=LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS03ZTg4MDM3NjgwNDBlDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9IndpZGdldFJlbmRlcklkIg0KDQpDbGFpbU5ld0RvY3VtZW50TGlua2VkV29ya3NoZWV0Ok5ld0RvY3VtZW50TGlua2VkU2NyZWVuOkRvY3VtZW50QXR0YWNobWVudERWOkF0dGFjaG1lbnQNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tN2U4ODAzNzY4MDQwZQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlUGF0aCINCg0KDQotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLTdlODgwMzc2ODA0MGUNCkNvbnRlbnQtRGlzcG9zaXRpb246IGZvcm0tZGF0YTsgbmFtZT0iY29tbWl0Q3VycmVudExvY2F0aW9uIg0KDQoNCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tN2U4ODAzNzY4MDQwZQ0KQ29udGVudC1EaXNwb3NpdGlvbjogZm9ybS1kYXRhOyBuYW1lPSJmaWxlQ29udGVudCI7IGZpbGVuYW1lPSJjbGFpbWNlbnRlcnY3XFRlc3REdXJhdGlvbl8yLnBuZyINCkNvbnRlbnQtVHlwZTogaW1hZ2UveC1wbmcNCg0KwolQTkc=}
=========================
HTTP response:
version:
HTTP/1.1
status:
401 Unauthorized
headers:
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 951
Date: Mon, 29 Apr 2024 12:06:07 GMT
body:
<html><head><title>Apache Tomcat/7.0.82 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>This request requires HTTP authentication.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.82</h3></body></html>
<<<<<<<<<<<<<<<<<<<<<<<<<
Is there anything that I am missing?