{"id":15069804,"url":"https://github.com/phax/ph-web","last_synced_at":"2025-04-10T16:53:37.124Z","repository":{"id":20035582,"uuid":"23303706","full_name":"phax/ph-web","owner":"phax","description":"Java library with common web stuff","archived":false,"fork":false,"pushed_at":"2025-03-03T18:46:10.000Z","size":9331,"stargazers_count":4,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T14:45:56.333Z","etag":null,"topics":["email","http","http-client","java","java-library","mail","network","ph-web","port","servlet","sitemap","smtp","user-agent","useragent","web","xservlet"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-08-25T06:12:42.000Z","updated_at":"2025-03-03T18:46:13.000Z","dependencies_parsed_at":"2023-02-19T01:30:25.857Z","dependency_job_id":"addd73e8-a235-4788-aab9-5ff671573460","html_url":"https://github.com/phax/ph-web","commit_stats":{"total_commits":1392,"total_committers":4,"mean_commits":348.0,"dds":0.006465517241379337,"last_synced_commit":"6551bd2238ac1cadab3406bca0d9810a5fc123e1"},"previous_names":[],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phax%2Fph-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phax%2Fph-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phax%2Fph-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phax%2Fph-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phax","download_url":"https://codeload.github.com/phax/ph-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248256827,"owners_count":21073604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","http","http-client","java","java-library","mail","network","ph-web","port","servlet","sitemap","smtp","user-agent","useragent","web","xservlet"],"created_at":"2024-09-25T01:44:47.745Z","updated_at":"2025-04-10T16:53:37.114Z","avatar_url":"https://github.com/phax.png","language":"Java","readme":"# ph-web\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.helger.web/ph-web-parent-pom/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.helger.web/ph-web-parent-pom) \n[![javadoc](https://javadoc.io/badge2/com.helger.web/ph-web/javadoc.svg)](https://javadoc.io/doc/com.helger.web/ph-web)\n[![CodeCov](https://codecov.io/gh/phax/ph-web/branch/master/graph/badge.svg)](https://codecov.io/gh/phax/ph-web)\n\n\nJava library with common web stuff. It contains the following sub-projects:\n* ph-dns (since v9.2.1)\n    * DNS client side helper methods based on dnsjava \n* ph-network\n    * Contains general network related stuff like Authenticators, DNS helpers, port and proxy classes\n* ph-http\n    * Contains special HTTP related helpers \n* ph-useragent\n    * Contains User-Agent/Browser related helpers \n* ph-servlet\n    * Contains special javax.servlet related helpers \n* ph-mail\n    * Contains javax.mail related helpers\n* ph-smtp\n    * Contains helper classes for asynchronous mail (re-)sending\n* ph-httpclient\n    * Contains Apache HTTP client related helpers\n* ph-web\n    * Other high-level abstraction for servlets, file-upload and web scopes\n* ph-sitemap (since v9.0.0)\n    * Containing Sitemap generation helper\n* ph-xservlet (since v9.0.0)\n    * Contains an extended Servlet framework (XServlet is just a name I gave it internally and not an official name)\n* ph-jsch (since v9.2.0)\n    * Helper around JSch - for SSH, SCP and SFTP connections  \n  \n# Maven usage\n\nAdd the following to your pom.xml to use this artifact, replacing `x.y.z` with the effective version number:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.helger.web\u003c/groupId\u003e\n  \u003cartifactId\u003eph-web\u003c/artifactId\u003e\n  \u003cversion\u003ex.y.z\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor to use it as a BOM put that in your `\u003cdependencyManagement\u003e` section:\n\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.helger.web\u003c/groupId\u003e\n  \u003cartifactId\u003eph-web-parent-pom\u003c/artifactId\u003e\n  \u003cversion\u003ex.y.z\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n  \u003cscope\u003eimport\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\nNote: prior to v9.3.0 the Maven groupId was `com.helger`.\n\n# News and noteworthy\n\n* v10.4.0 - 2025-02-25\n    * Added new classes `ResponseHandlerJsonObject` and `ResponseHandlerJsonArray`\n    * Deprecated classes `CSP2(Directive|Policy|SourceList)` in favour of `CSP(Directive|Policy|SourceList)` as CSV v3 stuff was integrated\n    * Added new predefined `CSPDirective` factory methods\n* v10.3.0 - 2025-02-03\n    * Updated to dnsjava 3.6.3\n    * Reversed the dependency between ph-servlet and ph-useragent (incompatible change)\n    * Removed the deprecated methods in `RequestHelper` and `IRequestWebScopeWithoutResponse` and `UnifiedResponse` related to the user agent\n    * Created new classes `UAProfileHeaderProviderHttpServletRequest` and `UAServletHelper`\n* v10.2.0 - 2025-01-21\n    * Updated to Apache HttpClient v5.4.x\n    * Replaced HttpClient `ConnectionSocketFactory` with `TlsSocketStrategy`\n    * Modified API of `HttpclientFactory` to use `TlsSocketStrategy`\n* v10.1.9 - 2024-07-29\n    * Updated to dnsjava 3.6.0 fixing CVE-2024-25638\n* v10.1.8 - 2024-03-27\n    * Updated to ph-commons 11.1.5\n    * Created Java 21 compatibility\n* v10.1.7 - 2024-01-07\n    * Fixed the DNS query type in `NonCachingDnsResolver.createDefaultLookup()` to not use `ANY`\n* v10.1.6 - 2024-01-05\n    * Updated to Apache HttpClient v5.3\n    * `HttpClientFactory.createConnectionManager` now returns a logging version if `HttpDebugger.isEnabled ()`\n    * Deprecated all methods regarding `IUserAgent` and `BrowserInfo` in the request and response helpers - they are out of date and the inclusion in the base API will be removed\n* v10.1.5 - 2023-08-06\n    * Wrapped additional `HttpServletRequest` methods in `ServletHelper`\n* v10.1.4 - 2023-07-31\n    * Updated to ph-commons 11.1\n* v10.1.3 - 2023-07-26\n    * Introduced `ServletHelper.getHeader` to work around a Tomcat error\n* v10.1.2 - 2023-07-24\n    * Updated to ph-commons 11.0.5\n    * Introduced `ServletHelper.getAttribute` to work around a Tomcat error\n* v10.1.1 - 2023-04-29\n    * Updated to ph-commons 11.0.4\n    * Improved handling of Surrogate characters in request parameters\n* v10.1.0 - 2023-02-24\n    * Using Servlet API 5.0.0 as the baseline: JakartaEE 9, Java 11+, Apache Tomcat v10.0.x, Jetty 11.x\n    * Using Eclipse Angus 2.0.1 for mailing\n    * Switched all namespaces from `javax.servlet` to `jakarta.servlet`\n* v10.0.1 - 2023-02-05\n    * Using Servlet API 4.0.1 as the baseline: JakartaEE 8, Java 11+, Apache Tomcat v9.x, Jetty 10.x\n    * Using Jakarta Mail 2.0.1 (because Bouncycastle is not yet available for Eclipse Angus)\n* v10.0.0 - 2023-02-01\n    * Using Java 11 as the baseline\n    * Updated to ph-commons 11\n    * Updated to Jakarta Mail 2.0.1\n    * Updated to Apache HttpClient v5.2.x\n    * Updated to dnsjava 3.5.2\n    * Deprecated `IHttpClientSettings.isUseSystemProperties`\n    * Removed all deprecated methods\n    * Added TLS 1.3 as the preferred TLS method\n    * Added new class `HttpClientSettingsConfig` to consistently configure `HttpClientSettings` via `IConfig`\n* v9.7.2 - 2022-10-18\n    * The class `ResponseHandlerXml` no longer uses ISO-8859-1 as the default charset if none was specified\n    * The class `ResponseHandlerMicroDom` no longer uses ISO-8859-1 as the default charset if none was specified\n    * The class `ResponseHandlerString` no has the possibility for a fallback charset\n    * Improved the JSCH session handling code\n* v9.7.1 - 2022-08-17\n    * Changed in `HttpClientSettings` from `*ConnectionTimout` to `*ConnectTimeout` to be consistent\n    * Added `(set|is)RetryAlways` in `HttpClientSettings` to allow to retry idempotent requests as well\n* v9.7.0 - 2022-08-17\n    * Updated to dnsjava 3.5.1\n    * Updated to Apache HttpClient v5 - backwards incompatible change\n    * Made `MockServletContext` and `MockServletPool` thread-safe. See https://github.com/phax/phase4/issues/92\n* v9.6.4 - 2022-05-09\n    * Updated to dnsjava 3.5.0\n    * The default value of `UnifiedResponse.allowContentOnStatusCode` is now `true`\n    * Added the method `AcceptMimeTypeList.getPreferredMimeType`\n    * Added the method `HttpClientFactory.httpClientSettings`\n    * Extended the `ExtendedHttpResponseException` API\n    * Fixed potential NPE in `RequestHelper.getRequestURIEncoded`\n* v9.6.3 - 2022-01-04\n    * Updated to Apache httpcore 4.4.15\n    * Updated to dnsjava 3.4.3\n    * Class `ResponseHandlerJson` now has a configurable fallback charset\n    * Class `UnifiedResponse` now supports silent mode\n* v9.6.2 - 2021-11-24\n    * Updated to dnsjava 3.4.2\n* v9.6.1 - 2021-05-31\n    * Updated to ph-commons 10.1\n    * Updated to Jakarta Mail 1.6.7\n    * Usage of HTTP \"keep-alive\" can now be configured via the `IHttpClientSettings`\n    * Created class `RequestTrackerSettings` to improve request tracking configuration\n* v9.6.0 - 2021-03-22\n    * Updated to ph-commons 10\n* v9.5.3 - 2021-03-03\n    * Extended `MailTransport` with default properties (e.g. for using other transport implementations)\n* v9.5.2 - 2021-01-11\n    * Updated to Apache httpcore 4.4.14\n    * Fixed the NAPTR resolution to be compatible with https://issues.oasis-open.org/browse/BDXR-29\n    * Made the `ConnectionReuseStrategy` customizable in `HttpClientFactory`\n* v9.5.1 - 2020-11-25\n    * Fixed an endless recursion in `NonCachingDnsResolver`\n* v9.5.0 - 2020-11-18\n    * Reverted back to Jakarta Mail 1.6.5 (because BouncyCastle is still on the old version)\n    * Reverted back to Jakarta Activation 1.2.2 (because BouncyCastle is still on the old version)\n    * Removed the default DNS servers for usage with the NAPTR record resolution\n    * Added a new class `NaptrLookup` to provide a more flexible NAPTR resolution logic\n    * The class `NaptrResolver` was changed to also use the builder pattern\n* v9.4.0 - 2020-11-13 (don't use)\n    * Updated to Apache httpclient 4.5.13\n    * Updated to dnsjava 3.3.1\n    * Updated to Jakarta Mail 2.0.0 (requiring Jakarta Activation as well)\n    * Extended CSP directives to also support `manifest-src`, `prefetch-src`, `worker-src` and `base-uri`\n    * Extended `HttpBasicAuth` API with a static method to create the header value\n    * Extended the `Accept*HeaderList` classes to also provide the String representation via `getAsHttpHeaderValue`\n* v9.3.4 - 2020-09-17\n    * `NaptrResolver` received a more flexible service name resolution\n    * Updated to Jakarta JAXB 2.3.3\n* v9.3.3 - 2020-08-30\n    * Updated to ph-commons 9.4.7\n* v9.3.2 - 2020-08-18\n    * Updated API in ph-xservlet\n* v9.3.1 - 2020-07-15\n    * Updated to ph-commons 9.4.6\n    * Deprecated `AcceptMimeTypeHandler.safeParseMimeType`\n    * Updated predefine MIME types list\n    * Updated to dnsjava 3.2.2\n* v9.3.0 - 2020-05-26\n    * Extracted ph-dns as a separate subproject\n    * Changed Maven groupId to `com.helger.web`\n    * Removed deprecated methods from previous versions\n* v9.2.0 - 2020-05-25\n    * Updated to dnsjava 3.1.0\n    * Updated to ph-commons 9.4.4 \n    * Extracted ph-jsch as a separate subproject\n* v9.1.12 - 2020-03-30\n    * Fixed a potential dead lock when shutting down RequestTracker\n* v9.1.11 - 2020-03-29\n    * Updated to Apache httpclient 4.5.12\n    * Updated to Jakarta Mail 1.6.5\n    * Updated the default TLS configuration modes to reflect the current situation \n    * Changed `ETLSConfigurationMode` to `ETLSConfigurationMode_2020_02` to indicate the date of effectiveness\n    * `LoggingLongRunningRequestCallback` now logs the remote address of the request by default\n    * Updated to ph-commons 9.4.0\n* v9.1.10 - 2020-02-18\n    * Updated to dnsjava 3.0.0\n    * All `getRequestURI` and `getRequestURL` methods were split in `...Encoded` and `...Decoded` methods for improved handling of URL encoding\n* v9.1.9 - 2020-02-16\n    * Extended `HttpClientSettings` with a customizable user agent string\n    * Added Apache HttpClient `PrivateKeyStrategy` and `TrustStrategy` implementations\n    * Extended `HttpClientSettings` with \"follow redirect\" setting\n    * Made `HttpClientSettings` clonable\n    * Simplified public `IEmailData` API for the receivers to use mutable lists\n    * `XServlet` filter and handler are no longer `Serializable`\n* v9.1.8 - 2020-02-14\n    * Extracted `HttpClientSettings` from `HttpClientFactory`\n    * Extended customization options of `HttpClientSettings`\n    * Improved error resilience\n* v9.1.7 - 2020-02-13\n    * Added explicit `HttpClientFactory.setProxyCredentials` method\n    * `HttpClientHelper.createRequest` now also supports `PATCH`\n    * `XServletFilterConsistency` has now a silent mode\n    * Disabled the default debug logging in the HTTP `ResponseHandler`    \n* v9.1.6 - 2020-02-07\n    * Updated to Apache httpcore 4.4.13\n    * Updated to Apache httpclient 4.5.11\n    * Enforcing commons-codec 1.14\n    * Changed HttpClient to not use commons-codec but SLF4J instead\n    * Improved error resilience\n* v9.1.5 - 2019-12-11\n    * Optimized logging\n    * Updated the `META-INF/mime.types` file with the latest MIME types\n    * `ServletContextPathHolder` uses the silent mode by default\n    * Added new class `PhMimetypesFileTypeMap` to enforce the loading of \"META-INF/mime.types\" from this project\n    * Removed \"META-INF/mime.types\" from \"ph-smtp\" and \"ph-httpclient\" projects\n    * Fixed NPE in `ProxySettingsManager`\n* v9.1.4 - 2019-10-08\n    * Updated to Apache httpcore 4.4.12\n    * Updated to Apache httpclient 4.5.10\n    * Extended `UnifiedRepsonse` and `UnifiedResponseDefaultSettings` API to make HTTP header value unification and quoting customizable.\n    * Updated to Jakarta dependencies\n    * `AbstractXServlet.destroy` is no longer final\n* v9.1.3 - 2019-08-28\n    * Updated to Apache httpclient 4.5.9\n    * Updated to ph-commons 9.3.6\n    * Added new method `IRequestWebScopeWithoutResponse.getURI()`\n    * `HttpDebugger` is disabled by default\n    * `AcceptMimeTypeHandler.safeParseMimeType` now automatically tries to decode RFC 2616 encoded values\n* v9.1.2 - 2019-06-05\n    * Updated to Apache httpclient 4.5.8\n    * Updated to ph-commons 9.3.3\n    * Added new method `LocalDateTime IWebScope.getScopeCreationDateTime ()`\n    * Added new class `NetworkOnlineStatusDeterminator` in `ph-network`\n* v9.1.1 - 2019-02-17\n    * Updated to JSch 0.1.55\n    * Updated to Apache httpcore 4.4.11\n    * Updated to Apache httpclient 4.5.7\n    * `XServletSettings` got a setting to set the `X-Frame-Options` HTTP header with a default value of `SAMEORIGIN`\n    * `XServletFilterSecurityHttpReferrerPolicy` adds the header before the request instead of afterwards\n    * Removed deprecated methods in classes `RequestField` and `SessionBackedRequestField`\n    * `HttpClientFactory` can now handle \"non proxy hosts\" as well\n* v9.1.0 - 2018-11-22\n    * Fixed potential NPE in `EmailAttachmentMicroTypeConverter` if the attachment cannot be read\n    * By default all request param values are now also Unicode normalized\n    * Added possibility to specify a custom \"param value cleanser\" using `RequestWebScope.setParamValueCleanser`\n    * Requires ph-commons 9.2.0\n* v9.0.5 - 2018-10-11\n    * Changed `IContentTransferEncoding` to deliver a full codec and not just a decoder\n    * Extended `NetworkPortHelper` with a remote port status checker\n    * Added new package `com.helger.http.tls` with TLS version and configuration enums\n* v9.0.4 - 2018-09-17\n    * Added forbidden character check in request parameter value handling\n* v9.0.3 - 2018-09-14\n    * Added new class `AbstractXFilterUnifiedResponse`\n    * `IRequestParamMap` was extended to easily retrieve trimmed values as well\n    * Updated to javax.mail 1.6.2\n    * Extended `CSP2SourceList` to support kyword `'none'`\n    * Extended `CSP2Policy` with new default directives\n    * Fixed potential stack overflow in RequestParamMap\n* v9.0.2 - 2018-07-24\n    * Fixed OSGI ServiceProvider configuration\n    * Requires ph-commons 9.1.3\n    * Fixed `XServlet` status reset in case Servlet init failed\n    * Added classes around `RequestFieldDataMultiValue`\n    * Updated to Apache HttpCore 4.4.10\n    * Reworked the ph-network/proxy handling (in an incompatible way)\n    * Added `IRequestParameter.getAsStringTrimmed`\n* v9.0.1 - 2018-04-18\n    * Updated to javax.mail 1.6.1\n    * Removed exclusion of javax.activation\n    * `AbstractXServlet` is now derived from `HttpServlet` and no longer from `GenericServlet`\n    * Extended `HttpClientFactory` methods slightly\n* v9.0.0 - 2017-12-20\n    * Updated to javax.mail 1.6.0\n    * Updated to ph-commons 9.0.0\n    * Added HTTP Referrer-Policy header support\n    * Extracted `ph-sitemap` from `ph-web`\n    * Added new sub-project `ph-xservlet` to contain an extended Servlet framework\n    * `HttpClientFactory` supports customizable retry count \n* v8.8.2 - 2017-07-04\n    * Made debug flag in certain `ResponseHandler*` implementations customizable\n    * `ServletHelper` caught Exception logging can now be enabled and disabled\n    * Custom `HostnameVerifier` in `HttpClientFactory`\n    * `HttpDebugger` has an `afterRequest` method now \n* v8.8.1 - 2017-05-29\n    * Improved exception handling in HTTP client helper\n* v8.8.0 - 2017-05-10\n    * New HTTP servlet class hierarchy for better separation of concerns\n    * Started new Servlet base infrastructure\n    * Added possibility to disable DNS client caching in `HttpClient`\n* v8.7.4 - 2017-03-29\n    * Improved PAC support to also handle IP6 addresses and `dnsResolveEx`\n    * Updated to ph-commons 8.6.3\n    * Updated to ph-schedule 3.6.1\n* v8.7.3 - 2017-03-02\n    * API extensions\n    * Added package `com.helger.servlet.logging` based on https://github.com/librucha/servlet-logging-filter\n* v8.7.2 - 2017-01-18\n    * Request multipart parsing for uploaded files is now limited to MIME type \"multipart/form-data\"\n* v8.7.1 - 2016-12-21\n    * API extensions\n    * Logging and JavaDoc improvements\n* v8.7.0 - 2016-12-12\n    * Binds to ph-commons 8.5.6\n    * Extracted new subprojects `ph-servlet` and `ph-useragent`\n* v8.6.3 - 2016-11-11\n    * Binds to ph-commons 8.5.3\n    * Work around some Tomcat/Jetty exceptions\n* v8.6.2 - 2016-09-25\n    * Added possibility to disable URL encoding (putting SESSION ID in URL) with WebSettings\n* v8.6.1 - 2016-09-09\n    * Binds to ph-commons 8.5.x\n* v8.6.0 - 2016-08-21\n    * Binds to ph-commons 8.4.x\n* v8.5.0 - 2016-07-26\n    * Binds to ph-commons 8.3.x\n\n---\n\nMy personal [Coding Styleguide](https://github.com/phax/meta/blob/master/CodingStyleguide.md) |\nIt is appreciated if you star the GitHub project if you like it.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphax%2Fph-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphax%2Fph-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphax%2Fph-web/lists"}