@ -1,5 +1,5 @@
/ *
/ *
* Copyright 2002 - 2022 the original author or authors .
* Copyright 2002 - 2024 the original author or authors .
*
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
* you may not use this file except in compliance with the License .
@ -30,15 +30,15 @@ import java.util.Map;
import java.util.Set ;
import java.util.Set ;
import java.util.StringTokenizer ;
import java.util.StringTokenizer ;
import com.gargoylesoftware.htmlunit.FormEncodingType ;
import com.gargoylesoftware.htmlunit.WebClient ;
import com.gargoylesoftware.htmlunit.WebRequest ;
import com.gargoylesoftware.htmlunit.util.KeyDataPair ;
import com.gargoylesoftware.htmlunit.util.NameValuePair ;
import jakarta.servlet.ServletContext ;
import jakarta.servlet.ServletContext ;
import jakarta.servlet.http.Cookie ;
import jakarta.servlet.http.Cookie ;
import jakarta.servlet.http.HttpServletRequest ;
import jakarta.servlet.http.HttpServletRequest ;
import jakarta.servlet.http.HttpSession ;
import jakarta.servlet.http.HttpSession ;
import org.htmlunit.FormEncodingType ;
import org.htmlunit.WebClient ;
import org.htmlunit.WebRequest ;
import org.htmlunit.util.KeyDataPair ;
import org.htmlunit.util.NameValuePair ;
import org.springframework.beans.Mergeable ;
import org.springframework.beans.Mergeable ;
import org.springframework.http.MediaType ;
import org.springframework.http.MediaType ;
@ -301,8 +301,8 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
}
}
}
}
Set < c om . ga rgoylesoftware . htmlunit . util . Cookie > managedCookies = this . webClient . getCookies ( this . webRequest . getUrl ( ) ) ;
Set < org . htmlunit . util . Cookie > managedCookies = this . webClient . getCookies ( this . webRequest . getUrl ( ) ) ;
for ( c om . ga rgoylesoftware . htmlunit . util . Cookie cookie : managedCookies ) {
for ( org . htmlunit . util . Cookie cookie : managedCookies ) {
processCookie ( request , cookies , new Cookie ( cookie . getName ( ) , cookie . getValue ( ) ) ) ;
processCookie ( request , cookies , new Cookie ( cookie . getName ( ) , cookie . getValue ( ) ) ) ;
}
}
@ -351,8 +351,8 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
this . webClient . getCookieManager ( ) . removeCookie ( createCookie ( request , sessionid ) ) ;
this . webClient . getCookieManager ( ) . removeCookie ( createCookie ( request , sessionid ) ) ;
}
}
private c om . ga rgoylesoftware . htmlunit . util . Cookie createCookie ( MockHttpServletRequest request , String sessionid ) {
private org . htmlunit . util . Cookie createCookie ( MockHttpServletRequest request , String sessionid ) {
return new c om . ga rgoylesoftware . htmlunit . util . Cookie ( request . getServerName ( ) , "JSESSIONID" , sessionid ,
return new org . htmlunit . util . Cookie ( request . getServerName ( ) , "JSESSIONID" , sessionid ,
request . getContextPath ( ) + "/" , null , request . isSecure ( ) , true ) ;
request . getContextPath ( ) + "/" , null , request . isSecure ( ) , true ) ;
}
}