EldoS | Feel safer!

Software components for data protection, secure storage and transfer

secureblackbox sample HTTPBlackbox

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#21496
Posted: 09/13/2012 08:43:09
by Konstantin Komkov (Basic support level)
Joined: 09/06/2012
Posts: 2

Good day
I am stat with samples.
and have a problem with sample HTTPBlackbox httpsServer

it has correct respond only to "Get" request
Code
  Private Sub ProcessRequest()
        Dim FS As FileStream = Nothing

        If m_currentRequest.Method = TSBHTTPMethod.hmGet Then
            Try
                FS = New FileStream(m_basePath + m_currentRequest.URL, FileMode.Open, FileAccess.Read)
                m_currentResponse.ContentLength = FS.Length
                m_currentResponse.StatusCode = 200
            Catch ex As Exception
                m_currentResponse.StatusCode = 404
            End Try

        
        Else
            m_currentResponse.StatusCode = 400
        End If

on "Post" server must save received file. (but samples has not this part)

Code
ElseIf m_currentRequest.Method = TSBHTTPMethod.hmPost Then

How can i get file info from "post" request ? (all fields describen on post)
Quote
Post(URL As String, Fields As SBStringList.TElStringList, FileField As String, FileName As String, FileStream As System.IO.Stream, ContentType As String, CloseStream As Boolean) As Integer
)

Can i get it from m_currentResponse ?

I know that question is easy enough, but i have not found answers in samples ,doc or forum




Konstantin
#21504
Posted: 09/13/2012 11:30:49
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Quote
on "Post" server must save received file.

In general a server can process POST request differently - not just save received file. This part was not implemented in the sample to simplify it.

Quote
I know that question is easy enough, but i have not found answers in samples ,doc or forum

Its not very easy. We'll enhance our sample to demonstrate this and write you back as soon as it will be ready.
#21519
Posted: 09/14/2012 01:51:49
by Vsevolod Ievgiienko (EldoS Corp.)

I've just sent you the enhanced sample via Helpdesk. This sample will be also available in the next SBB build.
#34017
Posted: 07/14/2015 10:02:36
by Raffaele Picone (Standard support level)
Joined: 07/14/2015
Posts: 2

I have the same problem. I don't understand how the Post Method can be handled at HTTP server side.
Can also send me a complete example ?
#34018
Posted: 07/14/2015 10:09:20
by Eugene Mayevski (EldoS Corp.)

HTTPPost sample includes a server-side PHP script which handles the data that the sample passes. So this is the complete sample.

In general, with POST method you start with the server - you implement some way to handle the files, and then on the client you prepare the transfer in format which is handled by the server.

If you tell me, what technology you use on the server, I might be able to give you a more detailed answer.


Sincerely yours
Eugene Mayevski
Also by EldoS: Solid File System
A virtual file system that offers a feature-rich storage for application documents and data with built-in compression and encryption.

Reply

Statistics

Topic viewed 1678 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!