From 211451d0f56701faa0f658c3d4728f404bba708e Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Tue, 20 Jun 2023 11:38:19 -0300 Subject: [PATCH] Remove extra changes in spacing and indentation. --- .../GxClasses/Core/Web/GxHttpServer.cs | 13 +++++++------ .../GxClasses/Domain/GxHttpClient.cs | 1 - .../dotnetframework/GxClasses/Middleware/GXHttp.cs | 7 +++++-- .../GxClasses/Model/GXWebProcedure.cs | 1 + 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/Web/GxHttpServer.cs b/dotnet/src/dotnetframework/GxClasses/Core/Web/GxHttpServer.cs index 1e6e32449..dbb4e1092 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/Web/GxHttpServer.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/Web/GxHttpServer.cs @@ -90,6 +90,7 @@ public class GxHttpResponse { HttpResponse _httpRes; IGxContext _context; + public GxHttpResponse(IGxContext context) { _context = context; @@ -131,7 +132,7 @@ public void AddString( string s) if (Response != null) { Response.Write(s); - } + } } public void AddFile( string fileName) @@ -141,16 +142,16 @@ public void AddFile( string fileName) Response.WriteFile(fileName.Trim()); } } - public void AppendHeader(string name, string value) + public void AppendHeader( string name, string value) { - if (string.Compare(name, "Content-Disposition", true) == 0) + if(string.Compare(name, "Content-Disposition", true) == 0) { value = GXUtil.EncodeContentDispositionHeader(value, _context.GetBrowserType()); } - if (_context != null) - _context.SetHeader(name, value); + if (_context!=null) + _context.SetHeader(name, value); } - + } public class GxSoapRequest : GxHttpRequest diff --git a/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs b/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs index e24736698..732c6a6cb 100644 --- a/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs +++ b/dotnet/src/dotnetframework/GxClasses/Domain/GxHttpClient.cs @@ -679,7 +679,6 @@ HttpResponseMessage ExecuteRequest(string method, string requestUrl, CookieConta handler.ReceiveDataTimeout = milliseconds; handler.ReceiveHeadersTimeout = milliseconds; #endif - using (client = new HttpClient(handler)) { client.Timeout = milliseconds; diff --git a/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs b/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs index 32696e1b0..9a6f7c778 100644 --- a/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs +++ b/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs @@ -45,6 +45,9 @@ namespace GeneXus.Http using Web.Security; using System.Web.SessionState; #endif + + + #if NETCORE public abstract class GXHttpHandler : GXBaseObject, IHttpHandler #else @@ -1545,8 +1548,6 @@ protected void SendResponseStatus(HttpStatusCode statusCode) { SendResponseStatus((int)statusCode, string.Empty); } - - #if !NETCORE protected void SendResponseStatus(int statusCode, string statusDescription) { @@ -1851,6 +1852,8 @@ public bool IsMain get { return _isMain; } } #endif + + public void ProcessRequest(HttpContext httpContext) { localHttpContext = httpContext; diff --git a/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs b/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs index e82d8eb18..d2c799c20 100644 --- a/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs +++ b/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs @@ -136,6 +136,7 @@ private void setOuputFileName() { fileType = outputType.ToLower(); } + context.HttpContext.Response.AddHeader(HttpHeader.CONTENT_DISPOSITION, $"inline; filename={fileName}.{fileType}"); }