File tree Expand file tree Collapse file tree
src/ImageSharp.Web/Middleware Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,9 +86,12 @@ internal enum PreconditionState
8686 }
8787
8888 /// <summary>
89- /// Returns the current HTTP request display url.
89+ /// Returns the current HTTP image request display url.
9090 /// </summary>
91- /// <returns>The. </returns>
91+ /// <returns>
92+ /// The combined components of the image request URL in a fully un-escaped form (except
93+ /// for the QueryString) suitable only for display.
94+ /// </returns>
9295 public string GetDisplayUrl ( ) => this . request . GetDisplayUrl ( ) ;
9396
9497 /// <summary>
Original file line number Diff line number Diff line change 99using System . Linq ;
1010using System . Threading . Tasks ;
1111using Microsoft . AspNetCore . Http ;
12+ using Microsoft . AspNetCore . Http . Extensions ;
1213using Microsoft . Extensions . Logging ;
1314using Microsoft . Extensions . Options ;
1415using Microsoft . IO ;
@@ -238,8 +239,7 @@ await this.options.OnParseCommandsAsync.Invoke(
238239 {
239240 // Log the error but let the pipeline handle the 404
240241 // by calling the next delegate/middleware in the pipeline.
241- var imageContext = new ImageContext ( httpContext , this . options ) ;
242- this . logger . LogImageResolveFailed ( imageContext . GetDisplayUrl ( ) ) ;
242+ this . logger . LogImageResolveFailed ( httpContext . Request . GetDisplayUrl ( ) ) ;
243243 await this . next ( httpContext ) ;
244244 return ;
245245 }
You can’t perform that action at this time.
0 commit comments