HTTP GET with authentication does not work in Adobe Indesign javascript

Hello

This is the code I am trying to run in the Indesign script. The URL http://localhost:4502/content/geometrixx/en/company/news/articles.html works directly in a browser, it renders the content. But when I try running the below in Indesign, it gives the following result. It does not really give the conent return.

InDesign script code:

response = "";

Conn = new Socket;

access the Adobe homepage

If (conn.open ("localhost:4502")) {}

var request = "GET /content/geometrixx/en/company/news/articles.html HTTP/1.0\n\n ' +.

"Authorization: basic admin:admin\n"

Conn.Write (request); and read the response from the server

response = conn.read (999999);

Alert (Reply);

Conn.Close ();

}

Output in Indesign:

HTTP/1.1 404 not found

Connection: close

Server: Day-Servlet-Engine/4.1.12

Content-Type: text/html; Charset = UTF-8

Content-Length: 387

Date: Wednesday, December 7, 2011 03:05:26 GMT

<! DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 / / BY" > ".

< html > < head >

< title > 404 not found < /title >

< / head > < body >

Found < H1 > < / h1 >

< p > the requested URL /content/geometrixx/en/company/news/articles.html was not found on this server. < /p >

< hr >

< address > ApacheSling/2.2 (Java hotspot Server VM 64 1.6.0_29;) Mac OS X 10.7.2 x86_64) < / address >

< body / > < / html >

Hello

Your code has problems.

1 HTTP request closed 1st line. Server wait and get the data so that come from "\n\n".

2. name and password of the user authorization string must be base64 encoding.

You can read as a reference:

http://en.Wikipedia.org/wiki/Basic_access_authentication

Here's an example query:

var request = "GET /autharea/index.html HTTP/1.1\n '.

+ "Host: (servername) \n".

+ "Content-Type: text/html;" Charset = UTF - 8\n ".

+ "Authorization: basic" + encodedData + "\n\n";

and work with function base64 code

var authStr = "name";

var encodedData = base64 (authStr);

var response = "";

var conn = new Socket;

var request = "GET /autharea/index.html HTTP/1.1\n '.

+ "Host: (serverName) \n"

+ "Content-Type: text/html;" Charset = UTF - 8\n ".

+ "Authorization: basic" + encodedData + "\n\n";

If (conn.open ('130.1.6.46:80', 'UTF-8')) {}

Conn.Write (request);

response = conn.read (999999);

Conn.Close ();

Alert (Reply);

}

function base64 (binaryString) {}

var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + / =";

var encoded = "";

var c1, c2, c3;

var e1, e2, e3, e4;

var i = 0;

While (i< binarystring.length)="">

C1 = binaryString.charCodeAt(i++);

C2 is equal to binaryString.charCodeAt(i++);

C3 = binaryString.charCodeAt(i++);

E1 = c1 > 2;

e2 = ((c1 & 3) < 4)="" |="" (c2="">> 4);

E3 = ((c2 & 15) < 2)="" |="" (c3=""> > 6);

E4 = c3 & 63;

If (isNaN (c2)) {}

E3 = e4 = 64;

} Else if (isNaN (c3)) {}

E4 = 64;

}

encoded = code + keyStr.charAt (e1) + keyStr.charAt (e2) +.

keyStr.charAt (e3) + keyStr.charAt (e4);

}

return encoded;

}

Ten

Tags: InDesign

Similar Questions

  • Resource Center does not work in Adobe Audition CS 5.5.  What can I do?

    Resource Center does not work in Adobe Audition CS 5.5.  What has happened and are these music and fx available anywhere?

    You can download it from

    Adobe Audition downloadable content: sound effects, loops and other.

  • My application get Windows 10 does not work HELP Please

    1 - my get app Windows 10 does not work. Whenever I try to run your PC compatibility check it says:

    The report is not available now, you can always book your upgrade when it's time to start the upgrade we will run another report to make sure that your PC works with Windows 10

    2. when I click on view Confirmation it Says:

    YOUR UPGRADE IS RESERVED

    There is nothing you need to do now, you will receive a notification on your PC when windows 10 is ready to install.

    and it been like this for 4 weeks and nothing happened what should I do to check if the applications on windows 7 runs on windows 10 or not and start the upgrade to windows 10

    Please help thanks

    Download the media creation tool

    Click with the right button on the MediaCreationTool.exe file and then click on run as administrator.

    Note: How to check if you are downloaded or installed the update Windows 10 November

    How to create an ISO or USB drive.

    Select upgrade this PC now and then click Next

    or

    Task of pre-required

    When you make significant changes to your computer for example updated operating system, you must always back up. See the links to resources on the backup by clicking the link for each version of Windows you are using: Windows XP, Windows Vista, Windows 7, Windows 8/8.1

    then

    then

    • Turn off (preferably uninstall) your Antivirus utility before you perform the upgrade.
    • Reboot several times, and then try again.
    • Disable the general USB peripherals (for example - smart card reader).
    • If you are using a SCSI drive, make sure you have the drivers available for your storage on a thumdrive device and it is connected. During the installation of Windows 10, click on the advanced custom Option and use the command load driver to load the driver for the SCSI drive. If this does not work and the installer still fails, consider switching to an IDE based hard drive.
    • Perform a clean boot, restart, and then try again.
    • If you upgrade to the. ISO file, disconnect from the Internet during the installation, if you are connected in LAN (Ethernet) or wireless, disable both, then try to install.
    • If you are updated through Windows Update, when download reaches 100% disconnect from the LAN (Ethernet) Internet or Wi - Fi, then proceed with the installation.
    • If this does not work, try using the. ISO file to upgrade if possible.
    • If you are connected to a domain, go to a local account.
    • If you have an external equipment, attached to the machine, unplug them (example, game controllers, USB sticks, external hard drive, printers, peripherals not essential).
  • The "Open with" function does not work.

    'Open with... '. "does not work. I have Win 7. Usually when I have a new type of file can I associate a program with this extension, but recently I am unable to do so. I have a midi file normal (extension .mid) and I try to associate a program with it with the function "open with...". ", I choose the program from the list, but after that the function"open with... ". "forget my selection. I looked at regedit, to try to solve the problem, but I could not understand what I have to change.

    Here are a few topics for you at checkout.

    Problem with the menu 'Open with' - Microsoft Answers:
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_programs/problem-with-open-with-menu/76b17b64-2Fe3-4c08-ac80-0ba80334dd8e

    Cannot select the program in 'open with... '. "- Microsoft Answers:
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-files/cannot-select-program-in-open-with/860fe524-4803-4c94-8ca7-7eac2649356c

    Can't 'open with... '. ', or define associations of files - Microsoft Answers:
    http://answers.Microsoft.com/en-us/Windows/Forum/windows_vista-windows_programs/cant-open-with-or-set-file-associations/d9452df6-c2c7-462e-B2ca-646f0ea782bd

  • Auto unlock with Sierra does not work

    Ive got everything turn on; two factor security, have my bluetooth turned on, to have a password on my watch, ect. When I turn on my laptop it says "Unlock with Apple Watch", but then makes me want to use the access code. Ive tried everything, reboot, reboot shows, ect.

    his cause, if it wasn't, it wouldn't show me 'release with Apple Watch ', so I know his shot, but for some reason, its does not work. Maybe a small problem?

    Check that you meet the requirements of the system

    Automatically unlock your Mac with your Apple Watch - Apple Support

  • Satellite L350 - 146 PSLD0E - common modul with XP does not work

    My problem is exactly the same as Gigels, except my Toshiba is not model Canadian but TOSHIBA EUROPE GMBH.

    My Toshiba is
    L350-146
    PSLD0E-00V00TF3

    The diver of common Modules does not work.
    How it does not work is because when I try to install Toshiba controls it tells me that "TOSHIBA common Modules is not installed on your computer. I can go on, but it does not (obviously). I've tried versions 1.00.05, 1.00.08 (both of which are on the European driver from Toshiba site) and none of them work.
    After you have installed one of them I get this message from PowerSaver: 'TOSHIBA common Modules does not run correctly. You can use TOSHIBA Power Saver. »

    * Please help me, it is obvious that a lot of people have same problem.*

    Hello

    If so many people have the same problem, I wonder why your assignment is almost 5 days without any comment about it.

    In any case, I put t know what is the problem but the fact is that all the drivers, tools and utilities must be installed in a specific order.

    After installing Windows XP SP2 home edition, you must install stuff like this:
    WINDOWS XP HOME SP2
    Driver Chipset
    Display driver
    Audio driver
    Driver modem
    Flash media driver
    Common modules
    LAN driver
    Touchpad driver
    Enabling/disabling the touchpad utility

    And so on.

    Common modules must be installed before you install any other Toshiba tool or utility. Common modules is something as a basis for all other tools and utilities.

    Energy-saving install almost to the end.

  • My "Get Assistance" function does not work on the HP Support Assistant, so I ask here.

    I have a desktop p7 - 1067c and am having problems with some hardware. The CD/DVD drive does not read disks and some keys on the keyboard do not work.

    I replaced the keyboard with a keyboard Dell (smart card) and now a different key does not work. I also rebooted the computer hardware drivers and the windows driver and still no change. My HP does not allow me to download the Dell keyboard driver.

    Does anyone have any advice as to what I should do next? Is this a hardware problem?

    My warranty is still valid.

    2 pieces of equipment failed? I would like to phone HP > 1-800-474-6836

  • Send signed with password does not work

    I'm trying to password protect some PDF files then use to send to the signature.

    I get an error of unsupported file type.

    It is a PDF. I added the Adobe password right.

    Help, please!

    I bought this so I could easily send things for signatures.

    It does not work if you add a password?

    I have to do something special to send protected Word files?

    Hi cynthiab17320112 , billa820241 & rd522,

    Please check the help below link:

    - How to encrypt your documents using Adobe sign

    Kind regards

    Nicos

  • Panel request ADF with Table does not work

    I am simple search.jsf of JSF page. In the search.jsf , I have an ADF search form. I drag and drop the view criteria into the Panel Query ADF with Table. The user search result will be displayed in a table ADF. The View object is simple no LOVs no variable binding even no where clause.



    Everything works fine if I run the page separately not with in the workflow. But if I turn the page with in a workflow, the search engine does not work.

    The workflow structure is simple, it has towed home.jsf and search.jsf pages and there is a control of navigation of the home page to the Search page. The problem is that the search engine is not work IE when I press the default search key that doesn't come with the form no coming on the data table.,.


    I use Jdeveloper with ADF technology 11.1.2.3

    My God, what a ridiculous and foolish.

    Partial trigger is missing.

    I have to add the id of the request to the partial trigger on the table. I thought that his coming by default to search forum.

    What a waste of time...

  • Download error - button charger works with applications does not work

    The "reload applications" button does not work. But under the tabs "Home" 'Assets', 'Community' everything works beautifully.

    What do I do?

    Capture-d’écran-2015-05-21-à-08.39.51.jpg

    Hi Serge,

    Please check the help below document:

    Download error in the applications tab of Creative Cloud Desktop Application

    You can also view the nets below where this issue has been addressed:

    https://forums.Adobe.com/thread/1156604

    Re: Creative Cloud "Download error" message

    Kind regards

    Sheena

  • Simple drag &amp; drop with Manager does not work in Edge?

    Hi all!

    I made this very simple example drag-and - drop on board: http://www.terredainventare.it/simpledrag/simpledrag.html using Jquery Ui http://docs.jQuery.com/UI/draggable .

    I try to use the property of "handle" JQueryUi which makes you drag an object restricting drag by clicking on a single element, but it does not work.

    Here is the code that I put in onCompositionReady edge:

    SYM. $("drag") .draggable ({handle: "handler"});

    Of course, my two Div elements are called "drag" and "Manager". Now the brake only works on element 'wrong' and not on the 'handle '...

    Here are the files Adobe Edge: http://www.terredainventare.it/simpledrag/Web.zip

    Thank you very much in advance for your help!

    Davide

    OK Joel, I solved it!

    The handle-div must be nested in the drag-dive to make it works!

    Here is the picture:

    Thanks a lot for your help!

    Davide

  • Flash Player 10 seems uncompatable with everything - does not work

    Please forgive me if I would have found my answer elsewhere but I searched the internet for a week including on the adobe site before trying this approach.

    My computer has of worked until last week when I allowed a Flash Player update - now nothing requires the work of flashplayer.

    I have a 1 year HP Compaq AMD Semeron 2.00 GB CQ5300y (1, 87Free) 64-bit operating system.  As I assertained Flash Player does not work in 64-bit I opened and downloaded 32 bit IE I can probably do it in my sleep.  I installed and used the uninstall tool and restarted both after you uninstall and then reinstall.  Yet when I click on a clip (youtube) or a link in an e-mail message, I got a popup that says I have to install the latest version of the player.

    I looked into installed programs and only see acrobat and reader 9.  Crontrol Panel configuration/programs I find the active x 10 Flash, adobe AIR, Adobe shockwave and DL Manager

    On IE, tools | Add - ons, you see Shockwave Flash object, and it is enabled?

  • What should I do if I need to register as a student, but the page or the link of the order confirmation does not work? Adobe does not support.

    I need help. I bought Dreamweaver Student and I wanted to register on the Adobe link . Unfortunately, the link does not work . Support via the phone number et chat I don't get . " I'm pretty upset by the absence of support for " ""no cloud user ' and think already by Paypal after return and deliver you of the program. I hope you can help me

    The question was made. You will find all the necessary information:

    Bestellvorgang as Adobe Student and Teacher Edition | EMEA, APAC

  • Effect of lens flare (Quick Time movie format) does not work in Adobe Premiere CS6

    Hey Adobe,

    My video effect flare (fornat VIDEO QUICK TIME) for the video transition does not work. Only the audio appear in my Adobe Premiere CS6.

    Please I need help from you.

    Thank you very much...

    -SieraG-

    Robodog

    You know.  I found already what the problem...

    I lose my file QUICK TIME ALTERNATIVE and QUICK TIME PLAYER.

    I downloaded these files and now everything is fine... !

    Thank you very much for your help...

    Kind regards

    -sammy g-

  • Photosmart 5510 e - all-in - One: Photosmart 5510 - scanning with iMac does not work

    After you have reinstalled the SW printer via the home network, the scan function is not visible when I opened the printer on my iMac. After the first installation has worked well. Then I had to reinstall all the SW on my Mac, so I lost the first installation of my printer. What can I do?

    Hi @HWEB

    What happens when you try to scan? Do you have a message of error before or during transmission scan, or do the software is not open? Maybe you can not locate the software now, or the software cannot communicate with the printer.

    While I wait for you, if the problem occurs when you print from several programs, please follow the steps below and let me know the results of your efforts.

    Scrub / uninstall

    • Open the Applications folder > HP or Hewlett-Packard folder > Uninstall HP
    • Click continue, click on one of the printers in the list.
    • * Only perform this step if you have not all other HP printers.  Press and hold the Option, control and command, while now the three buttons.
    • Click Uninstall.

    Manually uninstall the remaining files potentially - I apologize in advance is not a fun task! I'll try to make it easy to follow. Some of the files described in the following steps can be found, if you can't find one of the files or folders on your computer, do not be alarmed.

    Move the files or folders to the Recycle Bin, drag and drop

    • Macintosh HD/Applications / /Hewlett-Packard folder
    • Macintosh HD/Library/Application Support /- delete all files and folders on HP/Hewlett Packard
    • In Macintosh HD/Library/Caches - delete all files and folders on HP/Hewlett Packard
    • Macintosh HD/Library/Documentation/Help /- delete all files and folders on HP/Hewlett Packard
    • MacintoshHD/Library/Frameworks/HPServicesInterface.framework
    • MacintoshHD/Library/Frameworks/HPSmartX.framework
    • Macintosh HD/Library/Image Capture / TWAIN Data Sources /HP Scan Pro
    • In Macintosh HD/Library/Image Capture/Scripts - delete all files and folders on HP/Hewlett Packard
    • In Macintosh HD/Library/Preferences - delete all files and folders on HP/Hewlett Packard

    Move the Macintoshloginwindow.plist on the desktop. NOTE: Does not delete the loginwindow.plist file during the manual uninstallation may cause uninstall be retained.

    • In Macintosh HD/library/printers/hp - delete the folder
    • In Macintosh HD/Library/StartupItems, drag the following files in the trash, IO HP and HP trap monitor
    • In Macintosh HD/users/username (this should have a symbol of a house next to him) / Library/Preferences, drag the following files to the Trash: * all files starting with com.apple.print, * all files starting with com.hp, * all files beginning with Hewlett-Packard, * files starting with HP or hp
    • In MacintoshHD/users/USERNAME/Library/printers, drag all all-in-one printers listed here in the trash.
    • Drag the icons of HP from the dock and drop it onto a blank space on the desktop. The icon will disappear.

    Close all open windows.
    Turn it back on.
    Empty the trash.

    Reset the printing system

    1. Click on the Apple icon ( ), then click on System Preferences.

Maybe you are looking for

  • You are not allowed to create or update this content

    I am trying to create a new post, but when I click on 'Post' I get the error message "you are not allowed to create or update this content. Is this a bug or is it user error?

  • What happens when you disable and remove iCloud library after 30 days?

    Hello Apple, so today I disabled and deleted iCloud library in my settings, I wanted to know if the application is deleted from your phone after 30 days, to take pictures with your camera what happens after 30 days, and if after 30 days you turn on i

  • Gmail does not; only show gibberish

    I have been using firefox for a while now and suddenly does not charge any google site. When I go to google or gmail search I get 100 lines of gibberish (see screenshot). I can still access gmail in internet explore and on my iPhone so I'm fairly cer

  • Can't see the details - time and State of charge of battery

    my PC laptop battery charge and discharge ok but the icon in the taskbar can not tell me how cool.I left there just an empty battery that says remains unknown. Is there something wrong with my battery or is this a driver issue maybe?

  • Satellite M70-207: high temperature - how to open it?

    Hello I own an M70 207 for about a year. A few days ago I noticed a very high temperature in the light front right (near the speaker). I stopped it immediately.Since then, whenever I turned on the computer, it is this same something three or four min