Releases: danielklecha/SharpIppNext
Release list
v4.1.3
Full Changelog: v4.1.2...v4.1.3
v4.1.2
v4.1.1
What's Changed
🚀 Features & Enhancements
- Improve
IppRequestContentto returnContent-Lengthheader in #35
⚡ Core & Performance Improvements
- Implement asynchronous IPP binary reader and writer (
IppBinaryReader/IppBinaryWriter) to improve non-blocking I/O serialization performance.
📚 Documentation
- Add detailed documentation pages for over 15 client operations.
- Add new "Configuration and Best Practices" guide.
- Update
README.mdandSECURITY.md.
Full Changelog: v4.1.0...v4.1.1
v4.1.0
Release Notes: v4.1.0
This release focuses on memory efficiency, protocol parsing robustness, CPU architecture compatibility, and protection against Denial-of-Service (DoS) vectors when processing IPP messages.
🚀 Key Improvements & Features
1. Memory Efficiency & Streaming Output
- Zero-Buffer HTTP Content Streaming: Introduced
IppRequestContent, a customHttpContentimplementation that serializes IPP requests directly into the network stream. This avoids buffering the entire serialized payload in memory before transmission, significantly lowering memory consumption when sending large print jobs. - Document Stream Size Limits: Added a configurable limit (
MaxDocumentStreamBytes, defaulting to 128 MB) to cap incoming document payloads and prevent out-of-memory errors on large print jobs. Exceeding this limit returns aClientErrorRequestEntityTooLargeIPP error.
2. Robustness & Security (DoS Protections)
- Attribute Parsing Constraints: To protect against malformed or hostile payloads, new configurable boundaries have been introduced on
IIppProtocol:MaxMessageAttributesCount(defaults to5,000attributes) caps the maximum number of attributes parsed in a single message.MaxMessageAttributesBytes(defaults to10 MB) caps the total byte size of the attributes section.
- Parser Validation Enhancements:
- Enforced collection tag matching: the parser now throws an error if an
EndCollectiontag is encountered without a matchingBegCollectiontag. - Added validation for length parameters during parsing to safeguard against negative or truncated values.
- Internal parser failures (such as
EndOfStreamException) are now gracefully wrapped and returned as structuredIppRequestExceptionexceptions withClientErrorBadRequeststatus codes.
- Enforced collection tag matching: the parser now throws an error if an
3. Compatibility & Bug Fixes
- Non-Seekable Stream Compatibility: Removed all dependencies on
Stream.LengthandStream.Positionwhen parsing extended or unknown values. The IPP parser can now safely parse incoming data directly from forward-only, non-seekable streams (like network/socket streams) without throwingNotSupportedException. - Platform Endianness Fix: Fixed a platform-dependent bug in
IppVersionconversion. Previously, the converter relied onBitConverter, which is CPU-endianness dependent. It now uses explicit bitwise operations to guarantee consistent big-endian layout on all processor architectures.
Full Changelog:
v4.0.2...v4.1.0
v4.0.2
Bug Fixes
- Mapping: Added support for mapping from
Rangetobool(fixes a runtime mapping crash when a printer returnspage-ranges-supportedas a range/integer range rather than a boolean value).
Full Changelog:
v4.0.1...v4.0.2
v4.0.1
What's Changed
🚀 Features & Protocol Alignment
- Support for Range-based Media Dimensions: Changed
XDimensionandYDimensionproperties in theMediaSizeclass fromint?toRange?.- IPP specifications permit media size dimensions to be represented either as a single integer value or a range of integers (
rangeOfInteger). - The serialization logic in MediaSizeProfile now automatically maps dimensions to either
Tag.Integer(if the range boundaries are identical) orTag.RangeOfInteger(if the boundaries differ).
- IPP specifications permit media size dimensions to be represented either as a single integer value or a range of integers (
🛡️ Validation
- New
IppRangeAttribute: Introduced a new custom validation attribute in IppRangeAttribute.cs to validate both numeric andRange-based property values (as well as collections of ranges) within specified boundaries.
🔄 Backwards Compatibility & Migration
- Implicit Operator Support: Added an implicit converter from
inttoRangeinRange.cs:
public static implicit operator Range(int value) => new(value, value);Full Changelog:
v4.0.0...v4.0.1
v4.0.0
What's Changed
Version 4.0.0 is a major release featuring extensive specification coverage expansion, native Ahead-of-Time (AOT) compilation compatibility, transition to strongly-typed smart enums for IPP keyword attributes, and architectural API cleanups.
⚠️ Breaking Changes
- Validator Constructor Removal:
Validators (e.g.IIppRequestMessageValidator,IIppRequestValidator, etc.) have been removed from the constructor signatures ofSharpIppClientandSharpIppServer. Instead, they are now exposed as configurable public properties (RequestMessageValidator,RequestValidator, etc.) pre-populated with standard default instances. - Strongly-Typed Keywords (Smart Enums):
Standard IPP keyword attributes previously represented by arbitrary strings are now forced to use strongly-typed Smart Enums (e.g.,PrintColorMode,Compression,JobStateReason,Sides,MediaSource). - Attributes Renaming:
Unified and renamed generic attribute constants (e.g.,JobAttributeswas renamed toIppAttributeNamesto match standard raw attribute lookup structures). - Operation Obsoletions:
Marked deprecated or obsolete client operations with[Obsolete]attributes inISharpIppClientto align with RFC 2911, PWG 5100.5, PWG 5100.7, and PWG 5100.18. This includes:PrintUriAsync(Print-URI)SendUriAsync(Send-URI)DeleteDocumentAsync(Delete-Document)ReprocessJob(Reprocess-Job)
🚀 Features & Enhancements
1. Native AOT & Trimming Support
- Enabled Native AOT compatibility flags (
IsAotCompatibleandIsTrimmable) for assemblies targeting .NET 8.0/10.0. - Integrated
ILLink.Descriptors.xmlto preserve essential request, response, mapping, and validation models against IL trimming. - Added a Native AOT sample client and configured pipeline test runs to guarantee compatibility.
2. Deep Specification Parity Expansion
Massive implementation of attributes, operations, and models up to PWG 5100.22 (System Service v1.1), covering:
- PWG 5100.1 (Finishings)
- PWG 5100.2 (Output Bin)
- PWG 5100.3 (Production Printing)
- PWG 5100.5 (Document Object)
- PWG 5100.6 (Page Overrides)
- PWG 5100.7 (Job Extensions)
- PWG 5100.8 (Actual Attributes)
- PWG 5100.9 (Printer State)
- PWG 5100.11 (Job/Printer Set 2)
- PWG 5100.13 (System Service)
- PWG 5100.15 (FaxOut Service)
- PWG 5100.16 (Transaction Printing)
- PWG 5100.17 (3D Printing)
- PWG 5100.18 (Infrastructure)
- PWG 5100.21 (HTTP/2)
- PWG 5100.22 (System Service v1.1)
- Added support for PWG 5101.2 (Repertoire), PWG 5102.4 (Platform Mgmt), and PWG 5107.2 (Command Line Tool).
3. Smart Enum Refactoring
- Renamed
IKeywordSmartEnumtoIMarkedSmartEnumand introduced new smart enums to model IPP keywords safely. - Implemented
INoValueWritableandIIppStructuredStringinterfaces. - Integrated structured mappings for handling
NoValuetobooland other nullable/empty keyword conversions.
4. Custom Validation Attributes
- Implemented
ItemRangeAttribute,ByteRangeAttribute, andByteMultiRangeAttributeto support structured validation constraints on IPP request fields.
Full Changelog: v3.0.0...v4.0.0
Thank you to everyone for your continued support! Feel free to open an issue or discussion if you encounter any bumps during the upgrade.
v3.0.0
This version has a lot of improvements and breaking changes so I decided to change version number to 3.
- All typed response classes was rewrote based on specification. You don't need to search section but use properties for all attributes.
- Unsupported flag was removed from enums - int.MinValue or short.MinValue will be equivalent.
- Documentation was extended and describes requests, responses and advanced scenarios.
- Tests cover 100% of the code!
What's Changed
- Add more printer attributes, fix length of StringWithLanguage, enhance IppProtocol class by @pkocsis-kfx in #27
New Contributors
- @pkocsis-kfx made their first contribution in #27
Full Changelog: v2.2.0...v3.0.0
v2.2.0
v2.1.6
What's Changed
- Fixed the character encoding bug causing garbled Chinese characters in IPP attributes. by @fightroad in #23
New Contributors
- @fightroad made their first contribution in #23
Full Changelog: v2.1.5...v2.1.6