Giter VIP home page Giter VIP logo

Comments (4)

juks avatar juks commented on June 20, 2024

Hi. You need to use headerFormat parameter to set up the header.

If all of your header values are static, except length, you may set it like so:
--headerFormat=length:n:4,data:an:9:206000000

or you can add extra parameter mode (for the 000 and * thing):
--headerFormat=length:n:4,data:an:9:206000000,mode:an:9

In the second case you need to add mode method that will return the header value in this section:

and implement the logic for your case. But it seems to be impossible now since you do not have this rejection information anywhere.

Looks like this heavy header is set by an upstream not by the client host. Looks really strange.

from iso-8583-socket-queue.

itraore-TS avatar itraore-TS commented on June 20, 2024

I run the script as you proposed on option 1 this is what I have in verbose mode

Your environment has been set up for using Node.js 12.16.0 (ia32) and npm.

C:\Users\source\repos\iso-8583-socket-queue>node socketQueue.js --upstreamHost=46.182.6.101 --upstreamPort=9888 --listenHttpPort=8080 --headerFormat=length:n:4,data:an:9:206000000 --vv --logFile=log.txt
2020-02-21 04:13:06 - info: Important: starting...
2020-02-21 04:13:06 - info: Remote host configuration name: powerCardHPS
2020-02-21 04:13:06 - info: Connecting to upstream server 46.182.6.101:9888
2020-02-21 04:13:06 - info: Relay HTTP server is now running on port 8080
2020-02-21 04:13:06 - info: Connected to upstream 46.182.6.101:9888!
2020-02-21 04:13:06 - info: Processing queue [pending 0 / total 0]
2020-02-21 04:13:06 - info: The queue is empty
2020-02-21 04:13:19 - info: New HTTP socket
2020-02-21 04:13:19 - info: Client http:::1:49164 connected
2020-02-21 04:13:19 - info: Client http:::1:49164 sent data
2020-02-21 04:13:19 - info: http:::1:49164: Warning! Failed to parse iso8583 packet. Won't queue!
2020-02-21 04:13:19 - info: Client http:::1:49164 event

I sent the following http
curl -H "Content-Type: text/plain" -X POST -d '49534F30323539323932303035303030313230307234854108E1880316343038343630313035343034363334333030303030303030303030303039343830303132303132373130333330303036383731323031323731303333343131333032303132373631303330313635343134343230303335333306373030343030303030303030303030383633303034303030313330303430303030303136303132202038484F54454C2054454E455245202020202020202020202020204E69616D657920202020202020000950393230303336353439353210303039393030303030300025303030323030303030303030303431363030303636303130303331344536343142' http://localhost:8080/raw

from iso-8583-socket-queue.

juks avatar juks commented on June 20, 2024

For this case it takes an option to pass the raw part of client headers as JSON, but there is no such a feature implemented yet.

from iso-8583-socket-queue.

itraore-TS avatar itraore-TS commented on June 20, 2024

Hi Thank you for your help I manage to fix the issue it was as yo just a matter of adding a routine in the header generator. This tools is really powerful thank you for bringing it to our hand.

Please close this issue.

from iso-8583-socket-queue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.